Class DataPlaneAuthOptions
java.lang.Object
com.azure.resourcemanager.search.models.DataPlaneAuthOptions
- All Implemented Interfaces:
com.azure.json.JsonSerializable<DataPlaneAuthOptions>
public final class DataPlaneAuthOptions
extends Object
implements com.azure.json.JsonSerializable<DataPlaneAuthOptions>
Defines the options for how the search service authenticates a data plane request. This cannot be set if
'disableLocalAuth' is set to true.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.Get the apiKeyOnly property: Indicates that only the API key can be used for authentication.static DataPlaneAuthOptionsfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of DataPlaneAuthOptions from the JsonReader.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withAadOrApiKey(DataPlaneAadOrApiKeyAuthOption aadOrApiKey) Set the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.withApiKeyOnly(Object apiKeyOnly) Set the apiKeyOnly property: Indicates that only the API key can be used for authentication.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
-
DataPlaneAuthOptions
public DataPlaneAuthOptions()Creates an instance of DataPlaneAuthOptions class.
-
-
Method Details
-
apiKeyOnly
Get the apiKeyOnly property: Indicates that only the API key can be used for authentication.- Returns:
- the apiKeyOnly value.
-
withApiKeyOnly
Set the apiKeyOnly property: Indicates that only the API key can be used for authentication.- Parameters:
apiKeyOnly- the apiKeyOnly value to set.- Returns:
- the DataPlaneAuthOptions object itself.
-
aadOrApiKey
Get the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.- Returns:
- the aadOrApiKey value.
-
withAadOrApiKey
Set the aadOrApiKey property: Indicates that either the API key or an access token from a Microsoft Entra ID tenant can be used for authentication.- Parameters:
aadOrApiKey- the aadOrApiKey value to set.- Returns:
- the DataPlaneAuthOptions object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<DataPlaneAuthOptions>- Throws:
IOException
-
fromJson
public static DataPlaneAuthOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of DataPlaneAuthOptions from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of DataPlaneAuthOptions 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 DataPlaneAuthOptions.
-