# Source code for azure.graphrbac.models.service_principal_py3

    # coding=utf-8
    # --------------------------------------------------------------------------
    # Copyright (c) Microsoft Corporation. All rights reserved.
    # Licensed under the MIT License. See License.txt in the project root for
    # license information.
    #
    # Code generated by Microsoft (R) AutoRest Code Generator.
    # Changes may cause incorrect behavior and will be lost if the code is
    # regenerated.
    # --------------------------------------------------------------------------

    from .directory_object_py3 import DirectoryObject

    class ServicePrincipal(DirectoryObject):
        """Active Directory service principal information.

        Variables are only populated by the server, and will be ignored when
        sending a request.

        All required parameters must be populated in order to send to Azure.

        :param additional_properties: Unmatched properties from the message are
         deserialized this collection
        :type additional_properties: dict[str, object]
        :ivar object_id: The object ID.
        :vartype object_id: str
        :ivar deletion_timestamp: The time at which the directory object was
         deleted.
        :vartype deletion_timestamp: datetime
        :param object_type: Required. Constant filled by server.
        :type object_type: str
        :param account_enabled: whether or not the service principal account is
         enabled
        :type account_enabled: bool
        :param alternative_names: alternative names
        :type alternative_names: list[str]
        :ivar app_display_name: The display name exposed by the associated
         application.
        :vartype app_display_name: str
        :param app_id: The application ID.
        :type app_id: str
        :ivar app_owner_tenant_id:
        :vartype app_owner_tenant_id: str
        :param app_role_assignment_required: Specifies whether an
         AppRoleAssignment to a user or group is required before Azure AD will
         issue a user or access token to the application.
        :type app_role_assignment_required: bool
        :param app_roles: The collection of application roles that an application
         may declare. These roles can be assigned to users, groups or service
         principals.
        :type app_roles: list[~azure.graphrbac.models.AppRole]
        :param display_name: The display name of the service principal.
        :type display_name: str
        :param error_url: A URL provided by the author of the associated
         application to report errors when using the application.
        :type error_url: str
        :param homepage: The URL to the homepage of the associated application.
        :type homepage: str
        :param key_credentials: The collection of key credentials associated with
         the service principal.
        :type key_credentials: list[~azure.graphrbac.models.KeyCredential]
        :param logout_url: A URL provided by the author of the associated
         application to logout
        :type logout_url: str
        :ivar oauth2_permissions: The OAuth 2.0 permissions exposed by the
         associated application.
        :vartype oauth2_permissions:
         list[~azure.graphrbac.models.OAuth2Permission]
        :param password_credentials: The collection of password credentials
         associated with the service principal.
        :type password_credentials:
         list[~azure.graphrbac.models.PasswordCredential]
        :param preferred_token_signing_key_thumbprint: The thumbprint of preferred
         certificate to sign the token
        :type preferred_token_signing_key_thumbprint: str
        :param publisher_name: The publisher's name of the associated application
        :type publisher_name: str
        :param reply_urls: The URLs that user tokens are sent to for sign in with
         the associated application.  The redirect URIs that the oAuth 2.0
         authorization code and access tokens are sent to for the associated
         application.
        :type reply_urls: list[str]
        :param saml_metadata_url: The URL to the SAML metadata of the associated
         application
        :type saml_metadata_url: str
        :param service_principal_names: A collection of service principal names.
        :type service_principal_names: list[str]
        :param service_principal_type: the type of the service principal
        :type service_principal_type: str
        :param tags: Optional list of tags that you can apply to your service
         principals. Not nullable.
        :type tags: list[str]
        """

        _validation = {
            'object_id': {'readonly': True},
            'deletion_timestamp': {'readonly': True},
            'object_type': {'required': True},
            'app_display_name': {'readonly': True},
            'app_owner_tenant_id': {'readonly': True},
            'oauth2_permissions': {'readonly': True},
        }

        _attribute_map = {
            'additional_properties': {'key': '', 'type': '{object}'},
            'object_id': {'key': 'objectId', 'type': 'str'},
            'deletion_timestamp': {'key': 'deletionTimestamp', 'type': 'iso-8601'},
            'object_type': {'key': 'objectType', 'type': 'str'},
            'account_enabled': {'key': 'accountEnabled', 'type': 'bool'},
            'alternative_names': {'key': 'alternativeNames', 'type': '[str]'},
            'app_display_name': {'key': 'appDisplayName', 'type': 'str'},
            'app_id': {'key': 'appId', 'type': 'str'},
            'app_owner_tenant_id': {'key': 'appOwnerTenantId', 'type': 'str'},
            'app_role_assignment_required': {'key': 'appRoleAssignmentRequired', 'type': 'bool'},
            'app_roles': {'key': 'appRoles', 'type': '[AppRole]'},
            'display_name': {'key': 'displayName', 'type': 'str'},
            'error_url': {'key': 'errorUrl', 'type': 'str'},
            'homepage': {'key': 'homepage', 'type': 'str'},
            'key_credentials': {'key': 'keyCredentials', 'type': '[KeyCredential]'},
            'logout_url': {'key': 'logoutUrl', 'type': 'str'},
            'oauth2_permissions': {'key': 'oauth2Permissions', 'type': '[OAuth2Permission]'},
            'password_credentials': {'key': 'passwordCredentials', 'type': '[PasswordCredential]'},
            'preferred_token_signing_key_thumbprint': {'key': 'preferredTokenSigningKeyThumbprint', 'type': 'str'},
            'publisher_name': {'key': 'publisherName', 'type': 'str'},
            'reply_urls': {'key': 'replyUrls', 'type': '[str]'},
            'saml_metadata_url': {'key': 'samlMetadataUrl', 'type': 'str'},
            'service_principal_names': {'key': 'servicePrincipalNames', 'type': '[str]'},
            'service_principal_type': {'key': 'servicePrincipalType', 'type': 'str'},
            'tags': {'key': 'tags', 'type': '[str]'},
        }

        def __init__(self, *, additional_properties=None, account_enabled: bool=None, alternative_names=None, app_id: str=None, app_role_assignment_required: bool=None, app_roles=None, display_name: str=None, error_url: str=None, homepage: str=None, key_credentials=None, logout_url: str=None, password_credentials=None, preferred_token_signing_key_thumbprint: str=None, publisher_name: str=None, reply_urls=None, saml_metadata_url: str=None, service_principal_names=None, service_principal_type: str=None, tags=None, **kwargs) -> None:
            super(ServicePrincipal, self).__init__(additional_properties=additional_properties, **kwargs)
            self.account_enabled = account_enabled
            self.alternative_names = alternative_names
            self.app_display_name = None
            self.app_id = app_id
            self.app_owner_tenant_id = None
            self.app_role_assignment_required = app_role_assignment_required
            self.app_roles = app_roles
            self.display_name = display_name
            self.error_url = error_url
            self.homepage = homepage
            self.key_credentials = key_credentials
            self.logout_url = logout_url
            self.oauth2_permissions = None
            self.password_credentials = password_credentials
            self.preferred_token_signing_key_thumbprint = preferred_token_signing_key_thumbprint
            self.publisher_name = publisher_name
            self.reply_urls = reply_urls
            self.saml_metadata_url = saml_metadata_url
            self.service_principal_names = service_principal_names
            self.service_principal_type = service_principal_type
            self.tags = tags
            self.object_type = 'ServicePrincipal'