# coding: utf-8

"""
    SCORM Cloud Rest API

    REST API used for SCORM Cloud integrations.  # noqa: E501

    OpenAPI spec version: 2.0
    Contact: systems@rusticisoftware.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class SettingItem(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 = {
        'id': 'str',
        'effective_value': 'str',
        'effective_value_source': 'str',
        'explicit_value': 'str',
        'metadata': 'SettingMetadata'
    }

    attribute_map = {
        'id': 'id',
        'effective_value': 'effectiveValue',
        'effective_value_source': 'effectiveValueSource',
        'explicit_value': 'explicitValue',
        'metadata': 'metadata'
    }

    def __init__(self, id=None, effective_value=None, effective_value_source=None, explicit_value=None, metadata=None):  # noqa: E501
        """SettingItem - a model defined in Swagger"""  # noqa: E501

        self._id = None
        self._effective_value = None
        self._effective_value_source = None
        self._explicit_value = None
        self._metadata = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if effective_value is not None:
            self.effective_value = effective_value
        if effective_value_source is not None:
            self.effective_value_source = effective_value_source
        if explicit_value is not None:
            self.explicit_value = explicit_value
        if metadata is not None:
            self.metadata = metadata

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

        :return: The id of this SettingItem.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this SettingItem.

        :param id: The id of this SettingItem.  # noqa: E501
        :type: str
        """

        self._id = id

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

        The value of this setting that would be used if read at this level, including defaults, fallback, and values set at less specific levels.  # noqa: E501

        :return: The effective_value of this SettingItem.  # noqa: E501
        :rtype: str
        """
        return self._effective_value

    @effective_value.setter
    def effective_value(self, effective_value):
        """Sets the effective_value of this SettingItem.

        The value of this setting that would be used if read at this level, including defaults, fallback, and values set at less specific levels.  # noqa: E501

        :param effective_value: The effective_value of this SettingItem.  # noqa: E501
        :type: str
        """

        self._effective_value = effective_value

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

        The source of this effective value, default, fallback, or the level the value was set at.  # noqa: E501

        allowed_values = ["default", "application", "learningStandardForApplication", "dispatchDestination", "course", "dispatch", "registration"]  # noqa: E501

        :return: The effective_value_source of this SettingItem.  # noqa: E501
        :rtype: str
        """
        return self._effective_value_source

    @effective_value_source.setter
    def effective_value_source(self, effective_value_source):
        """Sets the effective_value_source of this SettingItem.

        The source of this effective value, default, fallback, or the level the value was set at.  # noqa: E501

        allowed_values = ["default", "application", "learningStandardForApplication", "dispatchDestination", "course", "dispatch", "registration"]  # noqa: E501

        :param effective_value_source: The effective_value_source of this SettingItem.  # noqa: E501
        :type: str
        """

        self._effective_value_source = effective_value_source

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

        The value of this setting that is explicitly set at this level. If not present, the setting is not specified at this level.  # noqa: E501

        :return: The explicit_value of this SettingItem.  # noqa: E501
        :rtype: str
        """
        return self._explicit_value

    @explicit_value.setter
    def explicit_value(self, explicit_value):
        """Sets the explicit_value of this SettingItem.

        The value of this setting that is explicitly set at this level. If not present, the setting is not specified at this level.  # noqa: E501

        :param explicit_value: The explicit_value of this SettingItem.  # noqa: E501
        :type: str
        """

        self._explicit_value = explicit_value

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

        :return: The metadata of this SettingItem.  # noqa: E501
        :rtype: SettingMetadata
        """
        return self._metadata

    @metadata.setter
    def metadata(self, metadata):
        """Sets the metadata of this SettingItem.

        :param metadata: The metadata of this SettingItem.  # noqa: E501
        :type: SettingMetadata
        """

        self._metadata = metadata

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

        return self.__dict__ == other.__dict__

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