java.lang.Object
com.azure.resourcemanager.machinelearning.models.ContentSafety
All Implemented Interfaces:
com.azure.json.JsonSerializable<ContentSafety>

public final class ContentSafety extends Object implements com.azure.json.JsonSerializable<ContentSafety>
The ContentSafety model.
  • Constructor Details

    • ContentSafety

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

    • contentSafetyStatus

      public ContentSafetyStatus contentSafetyStatus()
      Get the contentSafetyStatus property: [Required] Specifies the status of content safety.
      Returns:
      the contentSafetyStatus value.
    • withContentSafetyStatus

      public ContentSafety withContentSafetyStatus(ContentSafetyStatus contentSafetyStatus)
      Set the contentSafetyStatus property: [Required] Specifies the status of content safety.
      Parameters:
      contentSafetyStatus - the contentSafetyStatus value to set.
      Returns:
      the ContentSafety 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<ContentSafety>
      Throws:
      IOException
    • fromJson

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