Class ClassificationModelOptions (2.46.0)

public final class ClassificationModelOptions extends GeneratedMessageV3 implements ClassificationModelOptionsOrBuilder

Model options available for classification requests.

Protobuf type google.cloud.language.v1beta2.ClassificationModelOptions

Static Fields

V1_MODEL_FIELD_NUMBER

public static final int V1_MODEL_FIELD_NUMBER
Field Value
Type Description
int

V2_MODEL_FIELD_NUMBER

public static final int V2_MODEL_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static ClassificationModelOptions getDefaultInstance()
Returns
Type Description
ClassificationModelOptions

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static ClassificationModelOptions.Builder newBuilder()
Returns
Type Description
ClassificationModelOptions.Builder

newBuilder(ClassificationModelOptions prototype)

public static ClassificationModelOptions.Builder newBuilder(ClassificationModelOptions prototype)
Parameter
Name Description
prototype ClassificationModelOptions
Returns
Type Description
ClassificationModelOptions.Builder

parseDelimitedFrom(InputStream input)

public static ClassificationModelOptions parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ClassificationModelOptions parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static ClassificationModelOptions parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static ClassificationModelOptions parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static ClassificationModelOptions parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static ClassificationModelOptions parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static ClassificationModelOptions parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static ClassificationModelOptions parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static ClassificationModelOptions parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static ClassificationModelOptions parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static ClassificationModelOptions parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static ClassificationModelOptions parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<ClassificationModelOptions> parser()
Returns
Type Description
Parser<ClassificationModelOptions>

Methods

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getDefaultInstanceForType()

public ClassificationModelOptions getDefaultInstanceForType()
Returns
Type Description
ClassificationModelOptions

getModelTypeCase()

public ClassificationModelOptions.ModelTypeCase getModelTypeCase()
Returns
Type Description
ClassificationModelOptions.ModelTypeCase

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

getV1Model()

public ClassificationModelOptions.V1Model getV1Model()

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.v1beta2.ClassificationModelOptions.V1Model v1_model = 1;

Returns
Type Description
ClassificationModelOptions.V1Model

The v1Model.

getV1ModelOrBuilder()

public ClassificationModelOptions.V1ModelOrBuilder getV1ModelOrBuilder()

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.v1beta2.ClassificationModelOptions.V1Model v1_model = 1;

Returns
Type Description
ClassificationModelOptions.V1ModelOrBuilder

getV2Model()

public ClassificationModelOptions.V2Model getV2Model()

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.v1beta2.ClassificationModelOptions.V2Model v2_model = 2;

Returns
Type Description
ClassificationModelOptions.V2Model

The v2Model.

getV2ModelOrBuilder()

public ClassificationModelOptions.V2ModelOrBuilder getV2ModelOrBuilder()

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.v1beta2.ClassificationModelOptions.V2Model v2_model = 2;

Returns
Type Description
ClassificationModelOptions.V2ModelOrBuilder

hasV1Model()

public boolean hasV1Model()

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.v1beta2.ClassificationModelOptions.V1Model v1_model = 1;

Returns
Type Description
boolean

Whether the v1Model field is set.

hasV2Model()

public boolean hasV2Model()

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.v1beta2.ClassificationModelOptions.V2Model v2_model = 2;

Returns
Type Description
boolean

Whether the v2Model field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public ClassificationModelOptions.Builder newBuilderForType()
Returns
Type Description
ClassificationModelOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected ClassificationModelOptions.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public ClassificationModelOptions.Builder toBuilder()
Returns
Type Description
ClassificationModelOptions.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException