# coding: utf-8

"""
    DigitalRebar Provision Server

    # An RestFUL API-driven Provisioner and DHCP server  # noqa: E501

    OpenAPI spec version: 4.14.0
    Contact: support@rackn.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from drppy_client.configuration import Configuration


class IdentityProvider(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 = {
        'available': 'bool',
        'bundle': 'str',
        'created_at': 'datetime',
        'created_by': 'str',
        'default_role': 'str',
        'deny_if_no_groups': 'bool',
        'description': 'str',
        'display_name': 'str',
        'documentation': 'str',
        'endpoint': 'str',
        'errors': 'list[str]',
        'group_attribute': 'str',
        'group_to_roles': 'dict(str, list[str])',
        'last_modified_at': 'datetime',
        'last_modified_by': 'str',
        'logo_path': 'str',
        'meta': 'Meta',
        'meta_data_blob': 'str',
        'meta_data_url': 'str',
        'name': 'str',
        'read_only': 'bool',
        'user_attribute': 'str',
        'validated': 'bool'
    }

    attribute_map = {
        'available': 'Available',
        'bundle': 'Bundle',
        'created_at': 'CreatedAt',
        'created_by': 'CreatedBy',
        'default_role': 'DefaultRole',
        'deny_if_no_groups': 'DenyIfNoGroups',
        'description': 'Description',
        'display_name': 'DisplayName',
        'documentation': 'Documentation',
        'endpoint': 'Endpoint',
        'errors': 'Errors',
        'group_attribute': 'GroupAttribute',
        'group_to_roles': 'GroupToRoles',
        'last_modified_at': 'LastModifiedAt',
        'last_modified_by': 'LastModifiedBy',
        'logo_path': 'LogoPath',
        'meta': 'Meta',
        'meta_data_blob': 'MetaDataBlob',
        'meta_data_url': 'MetaDataUrl',
        'name': 'Name',
        'read_only': 'ReadOnly',
        'user_attribute': 'UserAttribute',
        'validated': 'Validated'
    }

    def __init__(self, available=None, bundle=None, created_at=None, created_by=None, default_role=None, deny_if_no_groups=None, description=None, display_name=None, documentation=None, endpoint=None, errors=None, group_attribute=None, group_to_roles=None, last_modified_at=None, last_modified_by=None, logo_path=None, meta=None, meta_data_blob=None, meta_data_url=None, name=None, read_only=None, user_attribute=None, validated=None, _configuration=None):  # noqa: E501
        """IdentityProvider - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._available = None
        self._bundle = None
        self._created_at = None
        self._created_by = None
        self._default_role = None
        self._deny_if_no_groups = None
        self._description = None
        self._display_name = None
        self._documentation = None
        self._endpoint = None
        self._errors = None
        self._group_attribute = None
        self._group_to_roles = None
        self._last_modified_at = None
        self._last_modified_by = None
        self._logo_path = None
        self._meta = None
        self._meta_data_blob = None
        self._meta_data_url = None
        self._name = None
        self._read_only = None
        self._user_attribute = None
        self._validated = None
        self.discriminator = None

        if available is not None:
            self.available = available
        if bundle is not None:
            self.bundle = bundle
        if created_at is not None:
            self.created_at = created_at
        if created_by is not None:
            self.created_by = created_by
        if default_role is not None:
            self.default_role = default_role
        if deny_if_no_groups is not None:
            self.deny_if_no_groups = deny_if_no_groups
        if description is not None:
            self.description = description
        if display_name is not None:
            self.display_name = display_name
        if documentation is not None:
            self.documentation = documentation
        if endpoint is not None:
            self.endpoint = endpoint
        if errors is not None:
            self.errors = errors
        if group_attribute is not None:
            self.group_attribute = group_attribute
        if group_to_roles is not None:
            self.group_to_roles = group_to_roles
        if last_modified_at is not None:
            self.last_modified_at = last_modified_at
        if last_modified_by is not None:
            self.last_modified_by = last_modified_by
        if logo_path is not None:
            self.logo_path = logo_path
        if meta is not None:
            self.meta = meta
        if meta_data_blob is not None:
            self.meta_data_blob = meta_data_blob
        if meta_data_url is not None:
            self.meta_data_url = meta_data_url
        self.name = name
        if read_only is not None:
            self.read_only = read_only
        if user_attribute is not None:
            self.user_attribute = user_attribute
        if validated is not None:
            self.validated = validated

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

        Available tracks whether or not the model passed validation.  # noqa: E501

        :return: The available of this IdentityProvider.  # noqa: E501
        :rtype: bool
        """
        return self._available

    @available.setter
    def available(self, available):
        """Sets the available of this IdentityProvider.

        Available tracks whether or not the model passed validation.  # noqa: E501

        :param available: The available of this IdentityProvider.  # noqa: E501
        :type: bool
        """

        self._available = available

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

        Bundle tracks the name of the store containing this object. This field is read-only, and cannot be changed via the API.  # noqa: E501

        :return: The bundle of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._bundle

    @bundle.setter
    def bundle(self, bundle):
        """Sets the bundle of this IdentityProvider.

        Bundle tracks the name of the store containing this object. This field is read-only, and cannot be changed via the API.  # noqa: E501

        :param bundle: The bundle of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._bundle = bundle

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

        CreatedAt is the time that this object was created.  # noqa: E501

        :return: The created_at of this IdentityProvider.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this IdentityProvider.

        CreatedAt is the time that this object was created.  # noqa: E501

        :param created_at: The created_at of this IdentityProvider.  # noqa: E501
        :type: datetime
        """

        self._created_at = created_at

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

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

        :return: The created_by of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._created_by

    @created_by.setter
    def created_by(self, created_by):
        """Sets the created_by of this IdentityProvider.

        CreatedBy stores the value of the user that created this object. Note: This value is stored ONLY if the object was created by a user which means that `currentUserName` needs to be populated in the authBlob  # noqa: E501

        :param created_by: The created_by of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._created_by = created_by

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

        DefaultRole - defines the default role to give these users  # noqa: E501

        :return: The default_role of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._default_role

    @default_role.setter
    def default_role(self, default_role):
        """Sets the default_role of this IdentityProvider.

        DefaultRole - defines the default role to give these users  # noqa: E501

        :param default_role: The default_role of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._default_role = default_role

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

        DenyIfNoGroups - defines if the auth should fail if no groups are found in the GroupAttribute  # noqa: E501

        :return: The deny_if_no_groups of this IdentityProvider.  # noqa: E501
        :rtype: bool
        """
        return self._deny_if_no_groups

    @deny_if_no_groups.setter
    def deny_if_no_groups(self, deny_if_no_groups):
        """Sets the deny_if_no_groups of this IdentityProvider.

        DenyIfNoGroups - defines if the auth should fail if no groups are found in the GroupAttribute  # noqa: E501

        :param deny_if_no_groups: The deny_if_no_groups of this IdentityProvider.  # noqa: E501
        :type: bool
        """

        self._deny_if_no_groups = deny_if_no_groups

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

        Description is a string for providing a simple description  # noqa: E501

        :return: The description of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._description

    @description.setter
    def description(self, description):
        """Sets the description of this IdentityProvider.

        Description is a string for providing a simple description  # noqa: E501

        :param description: The description of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._description = description

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

        DisplayName - The name to display to user  # noqa: E501

        :return: The display_name of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._display_name

    @display_name.setter
    def display_name(self, display_name):
        """Sets the display_name of this IdentityProvider.

        DisplayName - The name to display to user  # noqa: E501

        :param display_name: The display_name of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._display_name = display_name

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

        Documentation is a string for providing additional in depth information.  # noqa: E501

        :return: The documentation of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._documentation

    @documentation.setter
    def documentation(self, documentation):
        """Sets the documentation of this IdentityProvider.

        Documentation is a string for providing additional in depth information.  # noqa: E501

        :param documentation: The documentation of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._documentation = documentation

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

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :return: The endpoint of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._endpoint

    @endpoint.setter
    def endpoint(self, endpoint):
        """Sets the endpoint of this IdentityProvider.

        Endpoint tracks the owner of the object among DRP endpoints  # noqa: E501

        :param endpoint: The endpoint of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._endpoint = endpoint

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

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :return: The errors of this IdentityProvider.  # noqa: E501
        :rtype: list[str]
        """
        return self._errors

    @errors.setter
    def errors(self, errors):
        """Sets the errors of this IdentityProvider.

        If there are any errors in the validation process, they will be available here.  # noqa: E501

        :param errors: The errors of this IdentityProvider.  # noqa: E501
        :type: list[str]
        """

        self._errors = errors

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

        GroupAttribute - specifies the attribute in the Assertions to use as group memberships  # noqa: E501

        :return: The group_attribute of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._group_attribute

    @group_attribute.setter
    def group_attribute(self, group_attribute):
        """Sets the group_attribute of this IdentityProvider.

        GroupAttribute - specifies the attribute in the Assertions to use as group memberships  # noqa: E501

        :param group_attribute: The group_attribute of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._group_attribute = group_attribute

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

        GroupToRoles - defines the group names that map to DRP Roles  # noqa: E501

        :return: The group_to_roles of this IdentityProvider.  # noqa: E501
        :rtype: dict(str, list[str])
        """
        return self._group_to_roles

    @group_to_roles.setter
    def group_to_roles(self, group_to_roles):
        """Sets the group_to_roles of this IdentityProvider.

        GroupToRoles - defines the group names that map to DRP Roles  # noqa: E501

        :param group_to_roles: The group_to_roles of this IdentityProvider.  # noqa: E501
        :type: dict(str, list[str])
        """

        self._group_to_roles = group_to_roles

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

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :return: The last_modified_at of this IdentityProvider.  # noqa: E501
        :rtype: datetime
        """
        return self._last_modified_at

    @last_modified_at.setter
    def last_modified_at(self, last_modified_at):
        """Sets the last_modified_at of this IdentityProvider.

        LastModifiedAt is the time that this object was last modified.  # noqa: E501

        :param last_modified_at: The last_modified_at of this IdentityProvider.  # noqa: E501
        :type: datetime
        """

        self._last_modified_at = last_modified_at

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

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :return: The last_modified_by of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._last_modified_by

    @last_modified_by.setter
    def last_modified_by(self, last_modified_by):
        """Sets the last_modified_by of this IdentityProvider.

        LastModifiedBy stores the value of the user that last modified this object. NOTE: This value is populated ONLY if the object was modified by a user which means any actions done using machine tokens will not get tracked  # noqa: E501

        :param last_modified_by: The last_modified_by of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._last_modified_by = last_modified_by

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

        LogoPath - The path on DRP or the URL to the logo icon  # noqa: E501

        :return: The logo_path of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._logo_path

    @logo_path.setter
    def logo_path(self, logo_path):
        """Sets the logo_path of this IdentityProvider.

        LogoPath - The path on DRP or the URL to the logo icon  # noqa: E501

        :param logo_path: The logo_path of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._logo_path = logo_path

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


        :return: The meta of this IdentityProvider.  # noqa: E501
        :rtype: Meta
        """
        return self._meta

    @meta.setter
    def meta(self, meta):
        """Sets the meta of this IdentityProvider.


        :param meta: The meta of this IdentityProvider.  # noqa: E501
        :type: Meta
        """

        self._meta = meta

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

        MetaDataBlob - String form of the metadata - instead of MetaDataUrl  # noqa: E501

        :return: The meta_data_blob of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._meta_data_blob

    @meta_data_blob.setter
    def meta_data_blob(self, meta_data_blob):
        """Sets the meta_data_blob of this IdentityProvider.

        MetaDataBlob - String form of the metadata - instead of MetaDataUrl  # noqa: E501

        :param meta_data_blob: The meta_data_blob of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._meta_data_blob = meta_data_blob

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

        MetaDataUrl - URL to get the metadata for this IdP - instead of MetaDataBlob  # noqa: E501

        :return: The meta_data_url of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._meta_data_url

    @meta_data_url.setter
    def meta_data_url(self, meta_data_url):
        """Sets the meta_data_url of this IdentityProvider.

        MetaDataUrl - URL to get the metadata for this IdP - instead of MetaDataBlob  # noqa: E501

        :param meta_data_url: The meta_data_url of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._meta_data_url = meta_data_url

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

        Name is the name of this identity provider  # noqa: E501

        :return: The name of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this IdentityProvider.

        Name is the name of this identity provider  # noqa: E501

        :param name: The name of this IdentityProvider.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and name is None:
            raise ValueError("Invalid value for `name`, must not be `None`")  # noqa: E501

        self._name = name

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

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

        :return: The read_only of this IdentityProvider.  # noqa: E501
        :rtype: bool
        """
        return self._read_only

    @read_only.setter
    def read_only(self, read_only):
        """Sets the read_only of this IdentityProvider.

        ReadOnly tracks if the store for this object is read-only. This flag is informational, and cannot be changed via the API.  # noqa: E501

        :param read_only: The read_only of this IdentityProvider.  # noqa: E501
        :type: bool
        """

        self._read_only = read_only

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

        UserAttribute - specifies the attribute in the Assertions to use as username  # noqa: E501

        :return: The user_attribute of this IdentityProvider.  # noqa: E501
        :rtype: str
        """
        return self._user_attribute

    @user_attribute.setter
    def user_attribute(self, user_attribute):
        """Sets the user_attribute of this IdentityProvider.

        UserAttribute - specifies the attribute in the Assertions to use as username  # noqa: E501

        :param user_attribute: The user_attribute of this IdentityProvider.  # noqa: E501
        :type: str
        """

        self._user_attribute = user_attribute

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

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :return: The validated of this IdentityProvider.  # noqa: E501
        :rtype: bool
        """
        return self._validated

    @validated.setter
    def validated(self, validated):
        """Sets the validated of this IdentityProvider.

        Validated tracks whether or not the model has been validated.  # noqa: E501

        :param validated: The validated of this IdentityProvider.  # noqa: E501
        :type: bool
        """

        self._validated = validated

    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(IdentityProvider, 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, IdentityProvider):
            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, IdentityProvider):
            return True

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