Class ClassificationModelOptions (2.33.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
TypeDescription
int

V2_MODEL_FIELD_NUMBER

public static final int V2_MODEL_FIELD_NUMBER
Field Value
TypeDescription
int

Static Methods

getDefaultInstance()

public static ClassificationModelOptions getDefaultInstance()
Returns
TypeDescription
ClassificationModelOptions

getDescriptor()

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

newBuilder()

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

newBuilder(ClassificationModelOptions prototype)

public static ClassificationModelOptions.Builder newBuilder(ClassificationModelOptions prototype)
Parameter
NameDescription
prototypeClassificationModelOptions
Returns
TypeDescription
ClassificationModelOptions.Builder

parseDelimitedFrom(InputStream input)

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

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(byte[] data)

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

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteString data)

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

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

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

parseFrom(CodedInputStream input)

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

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(InputStream input)

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

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

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

parseFrom(ByteBuffer data)

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

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

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

parser()

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

Methods

equals(Object obj)

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

getDefaultInstanceForType()

public ClassificationModelOptions getDefaultInstanceForType()
Returns
TypeDescription
ClassificationModelOptions

getModelTypeCase()

public ClassificationModelOptions.ModelTypeCase getModelTypeCase()
Returns
TypeDescription
ClassificationModelOptions.ModelTypeCase

getParserForType()

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

getSerializedSize()

public int getSerializedSize()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the v2Model 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 ClassificationModelOptions.Builder newBuilderForType()
Returns
TypeDescription
ClassificationModelOptions.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

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

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

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

toBuilder()

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

writeTo(CodedOutputStream output)

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