Package com.azure.ai.openai.models
Class UserSecurityContext
java.lang.Object
com.azure.ai.openai.models.UserSecurityContext
- All Implemented Interfaces:
com.azure.json.JsonSerializable<UserSecurityContext>
public final class UserSecurityContext
extends Object
implements com.azure.json.JsonSerializable<UserSecurityContext>
User security context contains several parameters that describe the AI application itself,
and the end user that interacts with the AI application. These fields assist your security
operations teams to investigate and mitigate security incidents by providing a comprehensive
approach to protecting your AI applications. (Learn more at https://aka.ms/TP4AI/Documentation/EndUserContext)
about protecting AI applications using Microsoft Defender for Cloud.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic UserSecurityContextfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of UserSecurityContext from the JsonReader.Get the applicationName property: The name of the application.Get the endUserId property: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application.Get the endUserTenantId property: The Microsoft 365 tenant ID the end user belongs to.Get the sourceIp property: Captures the original client's IP address, accepting both IPv4 and IPv6 formats.setApplicationName(String applicationName) Set the applicationName property: The name of the application.setEndUserId(String endUserId) Set the endUserId property: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application.setEndUserTenantId(String endUserTenantId) Set the endUserTenantId property: The Microsoft 365 tenant ID the end user belongs to.setSourceIp(String sourceIp) Set the sourceIp property: Captures the original client's IP address, accepting both IPv4 and IPv6 formats.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
UserSecurityContext
public UserSecurityContext()Creates an instance of UserSecurityContext class.
-
-
Method Details
-
getApplicationName
Get the applicationName property: The name of the application. Sensitive personal information should not be included in this field.- Returns:
- the applicationName value.
-
setApplicationName
Set the applicationName property: The name of the application. Sensitive personal information should not be included in this field.- Parameters:
applicationName- the applicationName value to set.- Returns:
- the UserSecurityContext object itself.
-
getEndUserId
Get the endUserId property: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field.- Returns:
- the endUserId value.
-
setEndUserId
Set the endUserId property: This identifier is the Microsoft Entra ID (formerly Azure Active Directory) user object ID used to authenticate end-users within the generative AI application. Sensitive personal information should not be included in this field.- Parameters:
endUserId- the endUserId value to set.- Returns:
- the UserSecurityContext object itself.
-
getEndUserTenantId
Get the endUserTenantId property: The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multi tenant.- Returns:
- the endUserTenantId value.
-
setEndUserTenantId
Set the endUserTenantId property: The Microsoft 365 tenant ID the end user belongs to. It's required when the generative AI application is multi tenant.- Parameters:
endUserTenantId- the endUserTenantId value to set.- Returns:
- the UserSecurityContext object itself.
-
getSourceIp
Get the sourceIp property: Captures the original client's IP address, accepting both IPv4 and IPv6 formats.- Returns:
- the sourceIp value.
-
setSourceIp
Set the sourceIp property: Captures the original client's IP address, accepting both IPv4 and IPv6 formats.- Parameters:
sourceIp- the sourceIp value to set.- Returns:
- the UserSecurityContext object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<UserSecurityContext>- Throws:
IOException
-
fromJson
Reads an instance of UserSecurityContext from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of UserSecurityContext if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the UserSecurityContext.
-