Class ClassificationModelOptions (2.6.0)

publicfinalclass ClassificationModelOptionsextendsGeneratedMessageV3implementsClassificationModelOptionsOrBuilder

Model options available for classification requests.

Protobuf type google.cloud.language.v1.ClassificationModelOptions

Inherited Members

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

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description

newBuilder()

publicstaticClassificationModelOptions.BuildernewBuilder()
Returns
Type Description

newBuilder(ClassificationModelOptions prototype)

publicstaticClassificationModelOptions.BuildernewBuilder(ClassificationModelOptionsprototype)
Parameter
Name Description
Returns
Type Description

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

publicstaticClassificationModelOptionsparseFrom(CodedInputStreaminput)
Parameter
Name Description
Returns
Type Description
Exceptions
Type Description

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticClassificationModelOptionsparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Exceptions
Type Description

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

publicstaticParser<ClassificationModelOptions>parser()
Returns
Type Description

Methods

equals(Object obj)

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

getDefaultInstanceForType()

publicClassificationModelOptionsgetDefaultInstanceForType()
Returns
Type Description

getModelTypeCase()

publicClassificationModelOptions.ModelTypeCasegetModelTypeCase()
Returns
Type Description

getParserForType()

publicParser<ClassificationModelOptions>getParserForType()
Returns
Type Description
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getUnknownFields()

publicfinalUnknownFieldSetgetUnknownFields()
Returns
Type Description
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

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

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

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

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
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
Overrides

newBuilderForType()

publicClassificationModelOptions.BuildernewBuilderForType()
Returns
Type Description

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

publicClassificationModelOptions.BuildertoBuilder()
Returns
Type Description

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
Overrides Exceptions
Type Description

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.