RaiInvocationContentType Class

public final class RaiInvocationContentType
extends ExpandableStringEnum<RaiInvocationContentType>

How an invocations request/response body is parsed to locate text for content-safety moderation.

Field Summary

Modifier and Type Field and Description
static final RaiInvocationContentType JSON

Parse the body as JSON and evaluate the declared paths/selectors.

static final RaiInvocationContentType TEXT

Treat the whole (size-capped) body as text; paths/selectors are ignored.

Constructor Summary

Constructor Description
RaiInvocationContentType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of RaiInvocationContentType value.

Method Summary

Modifier and Type Method and Description
static RaiInvocationContentType fromString(String name)

Creates or finds a RaiInvocationContentType from its string representation.

static Collection<RaiInvocationContentType> values()

Gets known RaiInvocationContentType values.

Methods inherited from ExpandableStringEnum

Methods inherited from java.lang.Object

Field Details

JSON

public static final RaiInvocationContentType JSON

Parse the body as JSON and evaluate the declared paths/selectors.

TEXT

public static final RaiInvocationContentType TEXT

Treat the whole (size-capped) body as text; paths/selectors are ignored.

Constructor Details

RaiInvocationContentType

@Deprecated
public RaiInvocationContentType()

Deprecated

Use the fromString(String name) factory method.

Creates a new instance of RaiInvocationContentType value.

Method Details

fromString

public static RaiInvocationContentType fromString(String name)

Creates or finds a RaiInvocationContentType from its string representation.

Parameters:

name - a name to look for.

Returns:

the corresponding RaiInvocationContentType.

values

public static Collection<RaiInvocationContentType> values()

Gets known RaiInvocationContentType values.

Returns:

known RaiInvocationContentType values.

Applies to