# 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 ComAdobeGraniteCorsImplCORSPolicyImplProperties(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 = {
        'alloworigin': 'ConfigNodePropertyArray',
        'alloworiginregexp': 'ConfigNodePropertyArray',
        'allowedpaths': 'ConfigNodePropertyArray',
        'exposedheaders': 'ConfigNodePropertyArray',
        'maxage': 'ConfigNodePropertyInteger',
        'supportedheaders': 'ConfigNodePropertyArray',
        'supportedmethods': 'ConfigNodePropertyArray',
        'supportscredentials': 'ConfigNodePropertyBoolean'
    }

    attribute_map = {
        'alloworigin': 'alloworigin',
        'alloworiginregexp': 'alloworiginregexp',
        'allowedpaths': 'allowedpaths',
        'exposedheaders': 'exposedheaders',
        'maxage': 'maxage',
        'supportedheaders': 'supportedheaders',
        'supportedmethods': 'supportedmethods',
        'supportscredentials': 'supportscredentials'
    }

    def __init__(self, alloworigin=None, alloworiginregexp=None, allowedpaths=None, exposedheaders=None, maxage=None, supportedheaders=None, supportedmethods=None, supportscredentials=None):  # noqa: E501
        """ComAdobeGraniteCorsImplCORSPolicyImplProperties - a model defined in OpenAPI"""  # noqa: E501

        self._alloworigin = None
        self._alloworiginregexp = None
        self._allowedpaths = None
        self._exposedheaders = None
        self._maxage = None
        self._supportedheaders = None
        self._supportedmethods = None
        self._supportscredentials = None
        self.discriminator = None

        if alloworigin is not None:
            self.alloworigin = alloworigin
        if alloworiginregexp is not None:
            self.alloworiginregexp = alloworiginregexp
        if allowedpaths is not None:
            self.allowedpaths = allowedpaths
        if exposedheaders is not None:
            self.exposedheaders = exposedheaders
        if maxage is not None:
            self.maxage = maxage
        if supportedheaders is not None:
            self.supportedheaders = supportedheaders
        if supportedmethods is not None:
            self.supportedmethods = supportedmethods
        if supportscredentials is not None:
            self.supportscredentials = supportscredentials

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


        :return: The alloworigin of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._alloworigin

    @alloworigin.setter
    def alloworigin(self, alloworigin):
        """Sets the alloworigin of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param alloworigin: The alloworigin of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._alloworigin = alloworigin

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


        :return: The alloworiginregexp of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._alloworiginregexp

    @alloworiginregexp.setter
    def alloworiginregexp(self, alloworiginregexp):
        """Sets the alloworiginregexp of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param alloworiginregexp: The alloworiginregexp of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._alloworiginregexp = alloworiginregexp

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


        :return: The allowedpaths of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._allowedpaths

    @allowedpaths.setter
    def allowedpaths(self, allowedpaths):
        """Sets the allowedpaths of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param allowedpaths: The allowedpaths of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._allowedpaths = allowedpaths

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


        :return: The exposedheaders of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._exposedheaders

    @exposedheaders.setter
    def exposedheaders(self, exposedheaders):
        """Sets the exposedheaders of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param exposedheaders: The exposedheaders of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._exposedheaders = exposedheaders

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


        :return: The maxage of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyInteger
        """
        return self._maxage

    @maxage.setter
    def maxage(self, maxage):
        """Sets the maxage of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param maxage: The maxage of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyInteger
        """

        self._maxage = maxage

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


        :return: The supportedheaders of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._supportedheaders

    @supportedheaders.setter
    def supportedheaders(self, supportedheaders):
        """Sets the supportedheaders of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param supportedheaders: The supportedheaders of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._supportedheaders = supportedheaders

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


        :return: The supportedmethods of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyArray
        """
        return self._supportedmethods

    @supportedmethods.setter
    def supportedmethods(self, supportedmethods):
        """Sets the supportedmethods of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param supportedmethods: The supportedmethods of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyArray
        """

        self._supportedmethods = supportedmethods

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


        :return: The supportscredentials of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :rtype: ConfigNodePropertyBoolean
        """
        return self._supportscredentials

    @supportscredentials.setter
    def supportscredentials(self, supportscredentials):
        """Sets the supportscredentials of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.


        :param supportscredentials: The supportscredentials of this ComAdobeGraniteCorsImplCORSPolicyImplProperties.  # noqa: E501
        :type: ConfigNodePropertyBoolean
        """

        self._supportscredentials = supportscredentials

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

        return self.__dict__ == other.__dict__

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