# coding: utf-8

"""
    Argo

    Python client for Argo Workflows  # noqa: E501

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


import pprint
import re  # noqa: F401

import six


class V1ConfigMapEnvSource(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 = {
        'local_object_reference': 'V1LocalObjectReference',
        'optional': 'bool'
    }

    attribute_map = {
        'local_object_reference': 'localObjectReference',
        'optional': 'optional'
    }

    def __init__(self, local_object_reference=None, optional=None):  # noqa: E501
        """V1ConfigMapEnvSource - a model defined in Swagger"""  # noqa: E501

        self._local_object_reference = None
        self._optional = None
        self.discriminator = None

        if local_object_reference is not None:
            self.local_object_reference = local_object_reference
        if optional is not None:
            self.optional = optional

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

        The ConfigMap to select from.  # noqa: E501

        :return: The local_object_reference of this V1ConfigMapEnvSource.  # noqa: E501
        :rtype: V1LocalObjectReference
        """
        return self._local_object_reference

    @local_object_reference.setter
    def local_object_reference(self, local_object_reference):
        """Sets the local_object_reference of this V1ConfigMapEnvSource.

        The ConfigMap to select from.  # noqa: E501

        :param local_object_reference: The local_object_reference of this V1ConfigMapEnvSource.  # noqa: E501
        :type: V1LocalObjectReference
        """

        self._local_object_reference = local_object_reference

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


        :return: The optional of this V1ConfigMapEnvSource.  # noqa: E501
        :rtype: bool
        """
        return self._optional

    @optional.setter
    def optional(self, optional):
        """Sets the optional of this V1ConfigMapEnvSource.


        :param optional: The optional of this V1ConfigMapEnvSource.  # noqa: E501
        :type: bool
        """

        self._optional = optional

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

        return self.__dict__ == other.__dict__

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