# coding: utf-8
# Copyright (c) 2016, 2026, Oracle and/or its affiliates.  All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.

# NOTE: This class is auto generated by OracleSDKGenerator. DO NOT EDIT. API Version: 20230222


from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel  # noqa: F401
from oci.decorators import init_model_state_from_kwargs


@init_model_state_from_kwargs
class CredentialSummary(object):
    """
    Credential information
    """

    #: A constant which can be used with the key_type property of a CredentialSummary.
    #: This constant has a value of "CREDENTIAL_NAME"
    KEY_TYPE_CREDENTIAL_NAME = "CREDENTIAL_NAME"

    #: A constant which can be used with the key_type property of a CredentialSummary.
    #: This constant has a value of "PUBLIC_SYNONYM"
    KEY_TYPE_PUBLIC_SYNONYM = "PUBLIC_SYNONYM"

    def __init__(self, **kwargs):
        """
        Initializes a new CredentialSummary object with values from keyword arguments.
        The following keyword arguments are supported (corresponding to the getters/setters of this class):

        :param key:
            The value to assign to the key property of this CredentialSummary.
        :type key: str

        :param user_name:
            The value to assign to the user_name property of this CredentialSummary.
        :type user_name: str

        :param windows_domain:
            The value to assign to the windows_domain property of this CredentialSummary.
        :type windows_domain: str

        :param enabled:
            The value to assign to the enabled property of this CredentialSummary.
        :type enabled: str

        :param key_type:
            The value to assign to the key_type property of this CredentialSummary.
            Allowed values for this property are: "CREDENTIAL_NAME", "PUBLIC_SYNONYM", 'UNKNOWN_ENUM_VALUE'.
            Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.
        :type key_type: str

        :param owner:
            The value to assign to the owner property of this CredentialSummary.
        :type owner: str

        :param related_resource:
            The value to assign to the related_resource property of this CredentialSummary.
        :type related_resource: oci.database_tools_runtime.models.CredentialRelatedResource

        """
        self.swagger_types = {
            'key': 'str',
            'user_name': 'str',
            'windows_domain': 'str',
            'enabled': 'str',
            'key_type': 'str',
            'owner': 'str',
            'related_resource': 'CredentialRelatedResource'
        }
        self.attribute_map = {
            'key': 'key',
            'user_name': 'userName',
            'windows_domain': 'windowsDomain',
            'enabled': 'enabled',
            'key_type': 'keyType',
            'owner': 'owner',
            'related_resource': 'relatedResource'
        }
        self._key = None
        self._user_name = None
        self._windows_domain = None
        self._enabled = None
        self._key_type = None
        self._owner = None
        self._related_resource = None

    @property
    def key(self):
        """
        **[Required]** Gets the key of this CredentialSummary.
        Name of the credential


        :return: The key of this CredentialSummary.
        :rtype: str
        """
        return self._key

    @key.setter
    def key(self, key):
        """
        Sets the key of this CredentialSummary.
        Name of the credential


        :param key: The key of this CredentialSummary.
        :type: str
        """
        self._key = key

    @property
    def user_name(self):
        """
        **[Required]** Gets the user_name of this CredentialSummary.
        Name of the user that will be used to log in to the remote database or the remote or local operating system


        :return: The user_name of this CredentialSummary.
        :rtype: str
        """
        return self._user_name

    @user_name.setter
    def user_name(self, user_name):
        """
        Sets the user_name of this CredentialSummary.
        Name of the user that will be used to log in to the remote database or the remote or local operating system


        :param user_name: The user_name of this CredentialSummary.
        :type: str
        """
        self._user_name = user_name

    @property
    def windows_domain(self):
        """
        Gets the windows_domain of this CredentialSummary.
        For a Windows target, the Windows domain to use when logging in


        :return: The windows_domain of this CredentialSummary.
        :rtype: str
        """
        return self._windows_domain

    @windows_domain.setter
    def windows_domain(self, windows_domain):
        """
        Sets the windows_domain of this CredentialSummary.
        For a Windows target, the Windows domain to use when logging in


        :param windows_domain: The windows_domain of this CredentialSummary.
        :type: str
        """
        self._windows_domain = windows_domain

    @property
    def enabled(self):
        """
        **[Required]** Gets the enabled of this CredentialSummary.
        Indicates whether this credential is enabled (TRUE) or not (FALSE)


        :return: The enabled of this CredentialSummary.
        :rtype: str
        """
        return self._enabled

    @enabled.setter
    def enabled(self, enabled):
        """
        Sets the enabled of this CredentialSummary.
        Indicates whether this credential is enabled (TRUE) or not (FALSE)


        :param enabled: The enabled of this CredentialSummary.
        :type: str
        """
        self._enabled = enabled

    @property
    def key_type(self):
        """
        Gets the key_type of this CredentialSummary.
        Indicates whether this refers to a public synonym or not.

        Allowed values for this property are: "CREDENTIAL_NAME", "PUBLIC_SYNONYM", 'UNKNOWN_ENUM_VALUE'.
        Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.


        :return: The key_type of this CredentialSummary.
        :rtype: str
        """
        return self._key_type

    @key_type.setter
    def key_type(self, key_type):
        """
        Sets the key_type of this CredentialSummary.
        Indicates whether this refers to a public synonym or not.


        :param key_type: The key_type of this CredentialSummary.
        :type: str
        """
        allowed_values = ["CREDENTIAL_NAME", "PUBLIC_SYNONYM"]
        if not value_allowed_none_or_none_sentinel(key_type, allowed_values):
            key_type = 'UNKNOWN_ENUM_VALUE'
        self._key_type = key_type

    @property
    def owner(self):
        """
        **[Required]** Gets the owner of this CredentialSummary.
        Owner of the credential


        :return: The owner of this CredentialSummary.
        :rtype: str
        """
        return self._owner

    @owner.setter
    def owner(self, owner):
        """
        Sets the owner of this CredentialSummary.
        Owner of the credential


        :param owner: The owner of this CredentialSummary.
        :type: str
        """
        self._owner = owner

    @property
    def related_resource(self):
        """
        Gets the related_resource of this CredentialSummary.

        :return: The related_resource of this CredentialSummary.
        :rtype: oci.database_tools_runtime.models.CredentialRelatedResource
        """
        return self._related_resource

    @related_resource.setter
    def related_resource(self, related_resource):
        """
        Sets the related_resource of this CredentialSummary.

        :param related_resource: The related_resource of this CredentialSummary.
        :type: oci.database_tools_runtime.models.CredentialRelatedResource
        """
        self._related_resource = related_resource

    def __repr__(self):
        return formatted_flat_dict(self)

    def __eq__(self, other):
        if other is None:
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        return not self == other
