"""
    HCL AppScan on Cloud (v2)

    This API allows you to interact with the service. The API allows you to perform many of the operations available in the UI and more.</br>For authentication, use the relevant APIs in the Account section. A successful authentication response includes a bearer token for use in subsequent API calls. Pasting this token in the 'Access token' field above will automatically add the authorization header to any API call that requires a valid session.

    OpenAPI spec version: v2

    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

from pyasoc.configuration import Configuration


class MicrosoftDataODataQuerySemanticAstSingleValueNode:
    """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 = {
        "type_reference": "MicrosoftDataEdmIEdmTypeReference",
        "kind": "str",
    }

    attribute_map = {"type_reference": "TypeReference", "kind": "Kind"}

    def __init__(self, type_reference=None, kind=None, _configuration=None):
        """MicrosoftDataODataQuerySemanticAstSingleValueNode - a model defined in Swagger"""
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._type_reference = None
        self._kind = None
        self.discriminator = None

        if type_reference is not None:
            self.type_reference = type_reference
        if kind is not None:
            self.kind = kind

    @property
    def type_reference(self):
        # type: () -> MicrosoftDataEdmIEdmTypeReference
        """Gets the type_reference of this MicrosoftDataODataQuerySemanticAstSingleValueNode.


        :return: The type_reference of this MicrosoftDataODataQuerySemanticAstSingleValueNode.
        :rtype: MicrosoftDataEdmIEdmTypeReference
        """
        return self._type_reference

    @type_reference.setter
    def type_reference(self, type_reference):
        """Sets the type_reference of this MicrosoftDataODataQuerySemanticAstSingleValueNode.


        :param type_reference: The type_reference of this MicrosoftDataODataQuerySemanticAstSingleValueNode.
        :type: MicrosoftDataEdmIEdmTypeReference
        """

        self._type_reference = type_reference

    @property
    def kind(self):
        # type: () -> str
        """Gets the kind of this MicrosoftDataODataQuerySemanticAstSingleValueNode.


        :return: The kind of this MicrosoftDataODataQuerySemanticAstSingleValueNode.
        :rtype: str
        """
        return self._kind

    @kind.setter
    def kind(self, kind):
        """Sets the kind of this MicrosoftDataODataQuerySemanticAstSingleValueNode.


        :param kind: The kind of this MicrosoftDataODataQuerySemanticAstSingleValueNode.
        :type: str
        """
        allowed_values = [
            "None",
            "Constant",
            "Convert",
            "NonentityRangeVariableReference",
            "BinaryOperator",
            "UnaryOperator",
            "SingleValuePropertyAccess",
            "CollectionPropertyAccess",
            "SingleValueFunctionCall",
            "Any",
            "CollectionNavigationNode",
            "SingleNavigationNode",
            "SingleValueOpenPropertyAccess",
            "SingleEntityCast",
            "All",
            "EntityCollectionCast",
            "EntityRangeVariableReference",
            "SingleEntityFunctionCall",
            "CollectionFunctionCall",
            "EntityCollectionFunctionCall",
            "NamedFunctionParameter",
        ]
        if self._configuration.client_side_validation and kind not in allowed_values:
            raise ValueError(f"Invalid value for `kind` ({kind}), must be one of {allowed_values}")

        self._kind = kind

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

        for attr, _ in self.swagger_types.items():
            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(MicrosoftDataODataQuerySemanticAstSingleValueNode, 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, MicrosoftDataODataQuerySemanticAstSingleValueNode):
            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, MicrosoftDataODataQuerySemanticAstSingleValueNode):
            return True

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