Class ResponsesOutputContentRefusal

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

public final class ResponsesOutputContentRefusal extends ResponsesContent
The ResponsesOutputContentRefusal model.
  • Constructor Details

    • ResponsesOutputContentRefusal

      public ResponsesOutputContentRefusal(String refusal)
      Creates an instance of ResponsesOutputContentRefusal class.
      Parameters:
      refusal - the refusal value to set.
  • Method Details

    • getType

      public ResponsesContentType getType()
      Get the type property: The type property.
      Overrides:
      getType in class ResponsesContent
      Returns:
      the type value.
    • getRefusal

      public String getRefusal()
      Get the refusal property: The refusal property.
      Returns:
      the refusal value.
    • toJson

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

      public static ResponsesOutputContentRefusal fromJson(com.azure.json.JsonReader jsonReader) throws IOException
      Reads an instance of ResponsesOutputContentRefusal from the JsonReader.
      Parameters:
      jsonReader - The JsonReader being read.
      Returns:
      An instance of ResponsesOutputContentRefusal 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 ResponsesOutputContentRefusal.