Class ModerateTextResponse (2.21.0)

public final class ModerateTextResponse extends GeneratedMessageV3 implements ModerateTextResponseOrBuilder

The document moderation response message.

Protobuf type google.cloud.language.v1beta2.ModerateTextResponse

Static Fields

MODERATION_CATEGORIES_FIELD_NUMBER

public static final int MODERATION_CATEGORIES_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ModerateTextResponse getDefaultInstance()
Returns
TypeDescription
ModerateTextResponse

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

newBuilder()

public static ModerateTextResponse.Builder newBuilder()
Returns
TypeDescription
ModerateTextResponse.Builder

newBuilder(ModerateTextResponse prototype)

public static ModerateTextResponse.Builder newBuilder(ModerateTextResponse prototype)
Parameter
NameDescription
prototypeModerateTextResponse
Returns
TypeDescription
ModerateTextResponse.Builder

parseDelimitedFrom(InputStream input)

public static ModerateTextResponse parseDelimitedFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ModerateTextResponse parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
IOException

parseFrom(byte[] data)

public static ModerateTextResponse parseFrom(byte[] data)
Parameter
NameDescription
databyte[]
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ModerateTextResponse parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
databyte[]
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ModerateTextResponse parseFrom(ByteString data)
Parameter
NameDescription
dataByteString
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ModerateTextResponse parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteString
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ModerateTextResponse parseFrom(CodedInputStream input)
Parameter
NameDescription
inputCodedInputStream
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ModerateTextResponse parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input)

public static ModerateTextResponse parseFrom(InputStream input)
Parameter
NameDescription
inputInputStream
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ModerateTextResponse parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
IOException

parseFrom(ByteBuffer data)

public static ModerateTextResponse parseFrom(ByteBuffer data)
Parameter
NameDescription
dataByteBuffer
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ModerateTextResponse parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
dataByteBuffer
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ModerateTextResponse
Exceptions
TypeDescription
InvalidProtocolBufferException

parser()

public static Parser<ModerateTextResponse> parser()
Returns
TypeDescription
Parser<ModerateTextResponse>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
NameDescription
objObject
Returns
TypeDescription
boolean
Overrides

getDefaultInstanceForType()

public ModerateTextResponse getDefaultInstanceForType()
Returns
TypeDescription
ModerateTextResponse

getModerationCategories(int index)

public ClassificationCategory getModerationCategories(int index)

Harmful and sensitive categories representing the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ClassificationCategory

getModerationCategoriesCount()

public int getModerationCategoriesCount()

Harmful and sensitive categories representing the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1;

Returns
TypeDescription
int

getModerationCategoriesList()

public List<ClassificationCategory> getModerationCategoriesList()

Harmful and sensitive categories representing the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1;

Returns
TypeDescription
List<ClassificationCategory>

getModerationCategoriesOrBuilder(int index)

public ClassificationCategoryOrBuilder getModerationCategoriesOrBuilder(int index)

Harmful and sensitive categories representing the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1;

Parameter
NameDescription
indexint
Returns
TypeDescription
ClassificationCategoryOrBuilder

getModerationCategoriesOrBuilderList()

public List<? extends ClassificationCategoryOrBuilder> getModerationCategoriesOrBuilderList()

Harmful and sensitive categories representing the input document.

repeated .google.cloud.language.v1beta2.ClassificationCategory moderation_categories = 1;

Returns
TypeDescription
List<? extends com.google.cloud.language.v1beta2.ClassificationCategoryOrBuilder>

getParserForType()

public Parser<ModerateTextResponse> getParserForType()
Returns
TypeDescription
Parser<ModerateTextResponse>
Overrides

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hashCode()

public int hashCode()
Returns
TypeDescription
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

newBuilderForType()

public ModerateTextResponse.Builder newBuilderForType()
Returns
TypeDescription
ModerateTextResponse.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ModerateTextResponse.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
NameDescription
parentBuilderParent
Returns
TypeDescription
ModerateTextResponse.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
NameDescription
unusedUnusedPrivateParameter
Returns
TypeDescription
Object
Overrides

toBuilder()

public ModerateTextResponse.Builder toBuilder()
Returns
TypeDescription
ModerateTextResponse.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
NameDescription
outputCodedOutputStream
Overrides
Exceptions
TypeDescription
IOException