@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class GuardrailContentPolicy extends Object implements Serializable, Cloneable, StructuredPojo
Contains details about how to handle harmful content.
This data type is used in the following API operations:
Constructor and Description |
---|
GuardrailContentPolicy() |
Modifier and Type | Method and Description |
---|---|
GuardrailContentPolicy |
clone() |
boolean |
equals(Object obj) |
List<GuardrailContentFilter> |
getFilters()
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
|
int |
hashCode() |
void |
marshall(ProtocolMarshaller protocolMarshaller)
Marshalls this structured data using the given
ProtocolMarshaller . |
void |
setFilters(Collection<GuardrailContentFilter> filters)
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
|
String |
toString()
Returns a string representation of this object.
|
GuardrailContentPolicy |
withFilters(Collection<GuardrailContentFilter> filters)
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
|
GuardrailContentPolicy |
withFilters(GuardrailContentFilter... filters)
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
|
public List<GuardrailContentFilter> getFilters()
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
public void setFilters(Collection<GuardrailContentFilter> filters)
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
filters
- Contains the type of the content filter and how strongly it should apply to prompts and model responses.public GuardrailContentPolicy withFilters(GuardrailContentFilter... filters)
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
NOTE: This method appends the values to the existing list (if any). Use
setFilters(java.util.Collection)
or withFilters(java.util.Collection)
if you want to override
the existing values.
filters
- Contains the type of the content filter and how strongly it should apply to prompts and model responses.public GuardrailContentPolicy withFilters(Collection<GuardrailContentFilter> filters)
Contains the type of the content filter and how strongly it should apply to prompts and model responses.
filters
- Contains the type of the content filter and how strongly it should apply to prompts and model responses.public String toString()
toString
in class Object
Object.toString()
public GuardrailContentPolicy clone()
public void marshall(ProtocolMarshaller protocolMarshaller)
StructuredPojo
ProtocolMarshaller
.marshall
in interface StructuredPojo
protocolMarshaller
- Implementation of ProtocolMarshaller
used to marshall this object's data.