Class AzureCosmosDBFieldMappingOptions

java.lang.Object
com.azure.ai.openai.models.AzureCosmosDBFieldMappingOptions
All Implemented Interfaces:
com.azure.json.JsonSerializable<AzureCosmosDBFieldMappingOptions>

public final class AzureCosmosDBFieldMappingOptions extends Object implements com.azure.json.JsonSerializable<AzureCosmosDBFieldMappingOptions>
Optional settings to control how fields are processed when using a configured Azure Cosmos DB resource.
  • Constructor Details

    • AzureCosmosDBFieldMappingOptions

      public AzureCosmosDBFieldMappingOptions(List<String> contentFields, List<String> vectorFields)
      Creates an instance of AzureCosmosDBFieldMappingOptions class.
      Parameters:
      contentFields - the contentFields value to set.
      vectorFields - the vectorFields value to set.
  • Method Details

    • getVectorFields

      public List<String> getVectorFields()
      Get the vectorFields property: The names of fields that represent vector data.
      Returns:
      the vectorFields value.
    • getTitleField

      public String getTitleField()
      Get the titleField property: The name of the index field to use as a title.
      Returns:
      the titleField value.
    • setTitleField

      public AzureCosmosDBFieldMappingOptions setTitleField(String titleField)
      Set the titleField property: The name of the index field to use as a title.
      Parameters:
      titleField - the titleField value to set.
      Returns:
      the AzureCosmosDBFieldMappingOptions object itself.
    • getUrlField

      public String getUrlField()
      Get the urlField property: The name of the index field to use as a URL.
      Returns:
      the urlField value.
    • setUrlField

      public AzureCosmosDBFieldMappingOptions setUrlField(String urlField)
      Set the urlField property: The name of the index field to use as a URL.
      Parameters:
      urlField - the urlField value to set.
      Returns:
      the AzureCosmosDBFieldMappingOptions object itself.
    • getFilepathField

      public String getFilepathField()
      Get the filepathField property: The name of the index field to use as a filepath.
      Returns:
      the filepathField value.
    • setFilepathField

      public AzureCosmosDBFieldMappingOptions setFilepathField(String filepathField)
      Set the filepathField property: The name of the index field to use as a filepath.
      Parameters:
      filepathField - the filepathField value to set.
      Returns:
      the AzureCosmosDBFieldMappingOptions object itself.
    • getContentFields

      public List<String> getContentFields()
      Get the contentFields property: The names of index fields that should be treated as content.
      Returns:
      the contentFields value.
    • getContentFieldsSeparator

      public String getContentFieldsSeparator()
      Get the contentFieldsSeparator property: The separator pattern that content fields should use.
      Returns:
      the contentFieldsSeparator value.
    • setContentFieldsSeparator

      public AzureCosmosDBFieldMappingOptions setContentFieldsSeparator(String contentFieldsSeparator)
      Set the contentFieldsSeparator property: The separator pattern that content fields should use.
      Parameters:
      contentFieldsSeparator - the contentFieldsSeparator value to set.
      Returns:
      the AzureCosmosDBFieldMappingOptions object itself.
    • toJson

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.azure.json.JsonSerializable<AzureCosmosDBFieldMappingOptions>
      Throws:
      IOException
    • fromJson

      public static AzureCosmosDBFieldMappingOptions fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of AzureCosmosDBFieldMappingOptions from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of AzureCosmosDBFieldMappingOptions if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
      Throws:
      IllegalStateException - If the deserialized JSON object was missing any required properties.
      IOException - If an error occurs while reading the AzureCosmosDBFieldMappingOptions.