Class ModerateTextRequest (2.37.0)

public final class ModerateTextRequest extends GeneratedMessageV3 implements ModerateTextRequestOrBuilder

The document moderation request message.

Protobuf type google.cloud.language.v2.ModerateTextRequest

Static Fields

DOCUMENT_FIELD_NUMBER

public static final int DOCUMENT_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ModerateTextRequest getDefaultInstance()
Returns
TypeDescription
ModerateTextRequest

getDescriptor()

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

newBuilder()

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

newBuilder(ModerateTextRequest prototype)

public static ModerateTextRequest.Builder newBuilder(ModerateTextRequest prototype)
Parameter
NameDescription
prototypeModerateTextRequest
Returns
TypeDescription
ModerateTextRequest.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public ModerateTextRequest getDefaultInstanceForType()
Returns
TypeDescription
ModerateTextRequest

getDocument()

public Document getDocument()

Required. Input document.

.google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
Document

The document.

getDocumentOrBuilder()

public DocumentOrBuilder getDocumentOrBuilder()

Required. Input document.

.google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
DocumentOrBuilder

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
int
Overrides

hasDocument()

public boolean hasDocument()

Required. Input document.

.google.cloud.language.v2.Document document = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the document field is set.

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 ModerateTextRequest.Builder newBuilderForType()
Returns
TypeDescription
ModerateTextRequest.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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