Class ClassificationModelOptions (2.19.0)

publicfinalclass ClassificationModelOptionsextendsGeneratedMessageV3implementsClassificationModelOptionsOrBuilder

Model options available for classification requests.

Protobuf type google.cloud.language.v1.ClassificationModelOptions

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)

Static Fields

V1_MODEL_FIELD_NUMBER

publicstaticfinalintV1_MODEL_FIELD_NUMBER
Field Value
Type Description
int

V2_MODEL_FIELD_NUMBER

publicstaticfinalintV2_MODEL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticClassificationModelOptionsgetDefaultInstance()
Returns
Type Description
ClassificationModelOptions

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticClassificationModelOptions.BuildernewBuilder()
Returns
Type Description
ClassificationModelOptions.Builder

newBuilder(ClassificationModelOptions prototype)

publicstaticClassificationModelOptions.BuildernewBuilder(ClassificationModelOptionsprototype)
Parameter
Name Description
prototype ClassificationModelOptions
Returns
Type Description
ClassificationModelOptions.Builder

parseDelimitedFrom(InputStream input)

publicstaticClassificationModelOptionsparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticClassificationModelOptionsparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticClassificationModelOptionsparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticClassificationModelOptionsparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticClassificationModelOptionsparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticClassificationModelOptionsparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<ClassificationModelOptions>parser()
Returns
Type Description
Parser<ClassificationModelOptions>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

publicClassificationModelOptionsgetDefaultInstanceForType()
Returns
Type Description
ClassificationModelOptions

getModelTypeCase()

publicClassificationModelOptions.ModelTypeCasegetModelTypeCase()
Returns
Type Description
ClassificationModelOptions.ModelTypeCase

getParserForType()

publicParser<ClassificationModelOptions>getParserForType()
Returns
Type Description
Parser<ClassificationModelOptions>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getV1Model()

publicClassificationModelOptions.V1ModelgetV1Model()

Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.

.google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1;

Returns
Type Description
ClassificationModelOptions.V1Model

The v1Model.

getV1ModelOrBuilder()

publicClassificationModelOptions.V1ModelOrBuildergetV1ModelOrBuilder()

Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.

.google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1;

Returns
Type Description
ClassificationModelOptions.V1ModelOrBuilder

getV2Model()

publicClassificationModelOptions.V2ModelgetV2Model()

Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.

.google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2;

Returns
Type Description
ClassificationModelOptions.V2Model

The v2Model.

getV2ModelOrBuilder()

publicClassificationModelOptions.V2ModelOrBuildergetV2ModelOrBuilder()

Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.

.google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2;

Returns
Type Description
ClassificationModelOptions.V2ModelOrBuilder

hasV1Model()

publicbooleanhasV1Model()

Setting this field will use the V1 model and V1 content categories version. The V1 model is a legacy model; support for this will be discontinued in the future.

.google.cloud.language.v1.ClassificationModelOptions.V1Model v1_model = 1;

Returns
Type Description
boolean

Whether the v1Model field is set.

hasV2Model()

publicbooleanhasV2Model()

Setting this field will use the V2 model with the appropriate content categories version. The V2 model is a better performing model.

.google.cloud.language.v1.ClassificationModelOptions.V2Model v2_model = 2;

Returns
Type Description
boolean

Whether the v2Model field is set.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicClassificationModelOptions.BuildernewBuilderForType()
Returns
Type Description
ClassificationModelOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedClassificationModelOptions.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicClassificationModelOptions.BuildertoBuilder()
Returns
Type Description
ClassificationModelOptions.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.