# coding: utf-8

"""
    Aron API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: 1.0.0
    Generated by: https://openapi-generator.tech
"""


try:
    from inspect import getfullargspec
except ImportError:
    from inspect import getargspec as getfullargspec
import pprint
import re  # noqa: F401
import six

from vessl.openapi_client.configuration import Configuration


class SamlRoleDescriptor(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 = {
        'cache_duration': 'str',
        'contact_people': 'list[SamlContactPerson]',
        'error_url': 'str',
        'id': 'str',
        'key_descriptors': 'list[SamlKeyDescriptor]',
        'organization': 'SamlOrganization',
        'protocol_support_enumeration': 'str',
        'signature': 'EtreeElement',
        'valid_until': 'datetime'
    }

    attribute_map = {
        'cache_duration': 'CacheDuration',
        'contact_people': 'ContactPeople',
        'error_url': 'ErrorURL',
        'id': 'ID',
        'key_descriptors': 'KeyDescriptors',
        'organization': 'Organization',
        'protocol_support_enumeration': 'ProtocolSupportEnumeration',
        'signature': 'Signature',
        'valid_until': 'ValidUntil'
    }

    def __init__(self, cache_duration=None, contact_people=None, error_url=None, id=None, key_descriptors=None, organization=None, protocol_support_enumeration=None, signature=None, valid_until=None, local_vars_configuration=None):  # noqa: E501
        """SamlRoleDescriptor - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._cache_duration = None
        self._contact_people = None
        self._error_url = None
        self._id = None
        self._key_descriptors = None
        self._organization = None
        self._protocol_support_enumeration = None
        self._signature = None
        self._valid_until = None
        self.discriminator = None

        if cache_duration is not None:
            self.cache_duration = cache_duration
        if contact_people is not None:
            self.contact_people = contact_people
        if error_url is not None:
            self.error_url = error_url
        if id is not None:
            self.id = id
        if key_descriptors is not None:
            self.key_descriptors = key_descriptors
        if organization is not None:
            self.organization = organization
        if protocol_support_enumeration is not None:
            self.protocol_support_enumeration = protocol_support_enumeration
        if signature is not None:
            self.signature = signature
        self.valid_until = valid_until

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


        :return: The cache_duration of this SamlRoleDescriptor.  # noqa: E501
        :rtype: str
        """
        return self._cache_duration

    @cache_duration.setter
    def cache_duration(self, cache_duration):
        """Sets the cache_duration of this SamlRoleDescriptor.


        :param cache_duration: The cache_duration of this SamlRoleDescriptor.  # noqa: E501
        :type cache_duration: str
        """

        self._cache_duration = cache_duration

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


        :return: The contact_people of this SamlRoleDescriptor.  # noqa: E501
        :rtype: list[SamlContactPerson]
        """
        return self._contact_people

    @contact_people.setter
    def contact_people(self, contact_people):
        """Sets the contact_people of this SamlRoleDescriptor.


        :param contact_people: The contact_people of this SamlRoleDescriptor.  # noqa: E501
        :type contact_people: list[SamlContactPerson]
        """

        self._contact_people = contact_people

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


        :return: The error_url of this SamlRoleDescriptor.  # noqa: E501
        :rtype: str
        """
        return self._error_url

    @error_url.setter
    def error_url(self, error_url):
        """Sets the error_url of this SamlRoleDescriptor.


        :param error_url: The error_url of this SamlRoleDescriptor.  # noqa: E501
        :type error_url: str
        """

        self._error_url = error_url

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


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

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


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

        self._id = id

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


        :return: The key_descriptors of this SamlRoleDescriptor.  # noqa: E501
        :rtype: list[SamlKeyDescriptor]
        """
        return self._key_descriptors

    @key_descriptors.setter
    def key_descriptors(self, key_descriptors):
        """Sets the key_descriptors of this SamlRoleDescriptor.


        :param key_descriptors: The key_descriptors of this SamlRoleDescriptor.  # noqa: E501
        :type key_descriptors: list[SamlKeyDescriptor]
        """

        self._key_descriptors = key_descriptors

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


        :return: The organization of this SamlRoleDescriptor.  # noqa: E501
        :rtype: SamlOrganization
        """
        return self._organization

    @organization.setter
    def organization(self, organization):
        """Sets the organization of this SamlRoleDescriptor.


        :param organization: The organization of this SamlRoleDescriptor.  # noqa: E501
        :type organization: SamlOrganization
        """

        self._organization = organization

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


        :return: The protocol_support_enumeration of this SamlRoleDescriptor.  # noqa: E501
        :rtype: str
        """
        return self._protocol_support_enumeration

    @protocol_support_enumeration.setter
    def protocol_support_enumeration(self, protocol_support_enumeration):
        """Sets the protocol_support_enumeration of this SamlRoleDescriptor.


        :param protocol_support_enumeration: The protocol_support_enumeration of this SamlRoleDescriptor.  # noqa: E501
        :type protocol_support_enumeration: str
        """

        self._protocol_support_enumeration = protocol_support_enumeration

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


        :return: The signature of this SamlRoleDescriptor.  # noqa: E501
        :rtype: EtreeElement
        """
        return self._signature

    @signature.setter
    def signature(self, signature):
        """Sets the signature of this SamlRoleDescriptor.


        :param signature: The signature of this SamlRoleDescriptor.  # noqa: E501
        :type signature: EtreeElement
        """

        self._signature = signature

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


        :return: The valid_until of this SamlRoleDescriptor.  # noqa: E501
        :rtype: datetime
        """
        return self._valid_until

    @valid_until.setter
    def valid_until(self, valid_until):
        """Sets the valid_until of this SamlRoleDescriptor.


        :param valid_until: The valid_until of this SamlRoleDescriptor.  # noqa: E501
        :type valid_until: datetime
        """

        self._valid_until = valid_until

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = getfullargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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, SamlRoleDescriptor):
            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, SamlRoleDescriptor):
            return True

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