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 Details

    • DataPlaneAuthOptions

      public DataPlaneAuthOptions()
      Creates an instance of DataPlaneAuthOptions class.
  • Method Details

    • apiKeyOnly

      public Object apiKeyOnly()
      Get the apiKeyOnly property: Indicates that only the API key can be used for authentication.
      Returns:
      the apiKeyOnly value.
    • withApiKeyOnly

      public DataPlaneAuthOptions withApiKeyOnly(Object apiKeyOnly)
      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

      public DataPlaneAadOrApiKeyAuthOption 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

      public DataPlaneAuthOptions 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.
      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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.