Class ModelArmorConfig

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.ModelArmorConfig

public abstract class ModelArmorConfig extends JsonSerializable
Configuration for Model Armor integrations of prompt and responses. This data type is not supported in Gemini API.
  • Constructor Details

    • ModelArmorConfig

      public ModelArmorConfig()
  • Method Details

    • promptTemplateName

      public abstract Optional<String> promptTemplateName()
      Optional. The name of the Model Armor template to use for prompt sanitization.
    • responseTemplateName

      public abstract Optional<String> responseTemplateName()
      Optional. The name of the Model Armor template to use for response sanitization.
    • builder

      public static ModelArmorConfig.Builder builder()
      Instantiates a builder for ModelArmorConfig.
    • toBuilder

      public abstract ModelArmorConfig.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static ModelArmorConfig fromJson(String jsonString)
      Deserializes a JSON string to a ModelArmorConfig object.