Class ContentSafetyLabelResult.Builder
- java.lang.Object
-
- com.assemblyai.api.resources.transcripts.types.ContentSafetyLabelResult.Builder
-
- All Implemented Interfaces:
ContentSafetyLabelResult._FinalStage,ContentSafetyLabelResult.SentencesIdxEndStage,ContentSafetyLabelResult.SentencesIdxStartStage,ContentSafetyLabelResult.TextStage,ContentSafetyLabelResult.TimestampStage
- Enclosing class:
- ContentSafetyLabelResult
public static final class ContentSafetyLabelResult.Builder extends java.lang.Object implements ContentSafetyLabelResult.TextStage, ContentSafetyLabelResult.SentencesIdxStartStage, ContentSafetyLabelResult.SentencesIdxEndStage, ContentSafetyLabelResult.TimestampStage, ContentSafetyLabelResult._FinalStage
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContentSafetyLabelResult._FinalStageaddAllLabels(java.util.List<ContentSafetyLabel> labels)An array of safety labels, one per sensitive topic that was detected in the sectionContentSafetyLabelResult._FinalStageaddLabels(ContentSafetyLabel labels)An array of safety labels, one per sensitive topic that was detected in the sectionContentSafetyLabelResultbuild()ContentSafetyLabelResult.Builderfrom(ContentSafetyLabelResult other)ContentSafetyLabelResult._FinalStagelabels(java.util.List<ContentSafetyLabel> labels)ContentSafetyLabelResult.TimestampStagesentencesIdxEnd(int sentencesIdxEnd)The sentence index at which the section endsContentSafetyLabelResult.SentencesIdxEndStagesentencesIdxStart(int sentencesIdxStart)The sentence index at which the section beginsContentSafetyLabelResult.SentencesIdxStartStagetext(java.lang.String text)The transcript of the section flagged by the Content Moderation modelContentSafetyLabelResult._FinalStagetimestamp(Timestamp timestamp)Timestamp information for the section
-
-
-
Method Detail
-
from
public ContentSafetyLabelResult.Builder from(ContentSafetyLabelResult other)
- Specified by:
fromin interfaceContentSafetyLabelResult.TextStage
-
text
public ContentSafetyLabelResult.SentencesIdxStartStage text(java.lang.String text)
The transcript of the section flagged by the Content Moderation model
- Specified by:
textin interfaceContentSafetyLabelResult.TextStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
sentencesIdxStart
public ContentSafetyLabelResult.SentencesIdxEndStage sentencesIdxStart(int sentencesIdxStart)
The sentence index at which the section begins
- Specified by:
sentencesIdxStartin interfaceContentSafetyLabelResult.SentencesIdxStartStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
sentencesIdxEnd
public ContentSafetyLabelResult.TimestampStage sentencesIdxEnd(int sentencesIdxEnd)
The sentence index at which the section ends
- Specified by:
sentencesIdxEndin interfaceContentSafetyLabelResult.SentencesIdxEndStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
timestamp
public ContentSafetyLabelResult._FinalStage timestamp(Timestamp timestamp)
Timestamp information for the section
- Specified by:
timestampin interfaceContentSafetyLabelResult.TimestampStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addAllLabels
public ContentSafetyLabelResult._FinalStage addAllLabels(java.util.List<ContentSafetyLabel> labels)
An array of safety labels, one per sensitive topic that was detected in the section
- Specified by:
addAllLabelsin interfaceContentSafetyLabelResult._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
addLabels
public ContentSafetyLabelResult._FinalStage addLabels(ContentSafetyLabel labels)
An array of safety labels, one per sensitive topic that was detected in the section
- Specified by:
addLabelsin interfaceContentSafetyLabelResult._FinalStage- Returns:
- Reference to
thisso that method calls can be chained together.
-
labels
public ContentSafetyLabelResult._FinalStage labels(java.util.List<ContentSafetyLabel> labels)
- Specified by:
labelsin interfaceContentSafetyLabelResult._FinalStage
-
build
public ContentSafetyLabelResult build()
- Specified by:
buildin interfaceContentSafetyLabelResult._FinalStage
-
-