# coding: utf-8

"""
    Adobe Experience Manager OSGI config (AEM) API

    Swagger AEM OSGI is an OpenAPI specification for Adobe Experience Manager (AEM) OSGI Configurations API  # noqa: E501

    OpenAPI spec version: 1.0.0-pre.0
    Contact: opensource@shinesolutions.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties(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 = {
        'datasource_name': 'ConfigNodePropertyString',
        'datasource_svc_prop_name': 'ConfigNodePropertyString',
        'datasource_jndi_name': 'ConfigNodePropertyString',
        'jndi_properties': 'ConfigNodePropertyArray'
    }

    attribute_map = {
        'datasource_name': 'datasource.name',
        'datasource_svc_prop_name': 'datasource.svc.prop.name',
        'datasource_jndi_name': 'datasource.jndi.name',
        'jndi_properties': 'jndi.properties'
    }

    def __init__(self, datasource_name=None, datasource_svc_prop_name=None, datasource_jndi_name=None, jndi_properties=None):  # noqa: E501
        """OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties - a model defined in OpenAPI"""  # noqa: E501

        self._datasource_name = None
        self._datasource_svc_prop_name = None
        self._datasource_jndi_name = None
        self._jndi_properties = None
        self.discriminator = None

        if datasource_name is not None:
            self.datasource_name = datasource_name
        if datasource_svc_prop_name is not None:
            self.datasource_svc_prop_name = datasource_svc_prop_name
        if datasource_jndi_name is not None:
            self.datasource_jndi_name = datasource_jndi_name
        if jndi_properties is not None:
            self.jndi_properties = jndi_properties

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


        :return: The datasource_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :rtype: ConfigNodePropertyString
        """
        return self._datasource_name

    @datasource_name.setter
    def datasource_name(self, datasource_name):
        """Sets the datasource_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.


        :param datasource_name: The datasource_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :type: ConfigNodePropertyString
        """

        self._datasource_name = datasource_name

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


        :return: The datasource_svc_prop_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :rtype: ConfigNodePropertyString
        """
        return self._datasource_svc_prop_name

    @datasource_svc_prop_name.setter
    def datasource_svc_prop_name(self, datasource_svc_prop_name):
        """Sets the datasource_svc_prop_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.


        :param datasource_svc_prop_name: The datasource_svc_prop_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :type: ConfigNodePropertyString
        """

        self._datasource_svc_prop_name = datasource_svc_prop_name

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


        :return: The datasource_jndi_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :rtype: ConfigNodePropertyString
        """
        return self._datasource_jndi_name

    @datasource_jndi_name.setter
    def datasource_jndi_name(self, datasource_jndi_name):
        """Sets the datasource_jndi_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.


        :param datasource_jndi_name: The datasource_jndi_name of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :type: ConfigNodePropertyString
        """

        self._datasource_jndi_name = datasource_jndi_name

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


        :return: The jndi_properties of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._jndi_properties

    @jndi_properties.setter
    def jndi_properties(self, jndi_properties):
        """Sets the jndi_properties of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.


        :param jndi_properties: The jndi_properties of this OrgApacheSlingDatasourceJNDIDataSourceFactoryProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._jndi_properties = jndi_properties

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

        return self.__dict__ == other.__dict__

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