Class ClassificationModelOptions.Builder (2.56.0)

public static final class ClassificationModelOptions.Builder extends GeneratedMessageV3.Builder<ClassificationModelOptions.Builder> implements ClassificationModelOptionsOrBuilder

Model options available for classification requests.

Protobuf type google.cloud.language.v1beta2.ClassificationModelOptions

Static Methods

getDescriptor()

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

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ClassificationModelOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

build()

public ClassificationModelOptions build()
Returns
Type Description
ClassificationModelOptions

buildPartial()

public ClassificationModelOptions buildPartial()
Returns
Type Description
ClassificationModelOptions

clear()

public ClassificationModelOptions.Builder clear()
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ClassificationModelOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

clearModelType()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public ClassificationModelOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

clearV1Model()

public ClassificationModelOptions.Builder clearV1Model()

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.Builder

clearV2Model()

public ClassificationModelOptions.Builder clearV2Model()

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.Builder

clone()

public ClassificationModelOptions.Builder clone()
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

getDefaultInstanceForType()

public ClassificationModelOptions getDefaultInstanceForType()
Returns
Type Description
ClassificationModelOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getModelTypeCase()

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

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.

getV1ModelBuilder()

public ClassificationModelOptions.V1Model.Builder getV1ModelBuilder()

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.Builder

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.

getV2ModelBuilder()

public ClassificationModelOptions.V2Model.Builder getV2ModelBuilder()

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.Builder

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.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(ClassificationModelOptions other)

public ClassificationModelOptions.Builder mergeFrom(ClassificationModelOptions other)
Parameter
Name Description
other ClassificationModelOptions
Returns
Type Description
ClassificationModelOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ClassificationModelOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
ClassificationModelOptions.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public ClassificationModelOptions.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ClassificationModelOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

mergeV1Model(ClassificationModelOptions.V1Model value)

public ClassificationModelOptions.Builder mergeV1Model(ClassificationModelOptions.V1Model value)

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;

Parameter
Name Description
value ClassificationModelOptions.V1Model
Returns
Type Description
ClassificationModelOptions.Builder

mergeV2Model(ClassificationModelOptions.V2Model value)

public ClassificationModelOptions.Builder mergeV2Model(ClassificationModelOptions.V2Model value)

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;

Parameter
Name Description
value ClassificationModelOptions.V2Model
Returns
Type Description
ClassificationModelOptions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ClassificationModelOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public ClassificationModelOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ClassificationModelOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
ClassificationModelOptions.Builder
Overrides

setV1Model(ClassificationModelOptions.V1Model value)

public ClassificationModelOptions.Builder setV1Model(ClassificationModelOptions.V1Model value)

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;

Parameter
Name Description
value ClassificationModelOptions.V1Model
Returns
Type Description
ClassificationModelOptions.Builder

setV1Model(ClassificationModelOptions.V1Model.Builder builderForValue)

public ClassificationModelOptions.Builder setV1Model(ClassificationModelOptions.V1Model.Builder builderForValue)

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;

Parameter
Name Description
builderForValue ClassificationModelOptions.V1Model.Builder
Returns
Type Description
ClassificationModelOptions.Builder

setV2Model(ClassificationModelOptions.V2Model value)

public ClassificationModelOptions.Builder setV2Model(ClassificationModelOptions.V2Model value)

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;

Parameter
Name Description
value ClassificationModelOptions.V2Model
Returns
Type Description
ClassificationModelOptions.Builder

setV2Model(ClassificationModelOptions.V2Model.Builder builderForValue)

public ClassificationModelOptions.Builder setV2Model(ClassificationModelOptions.V2Model.Builder builderForValue)

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;

Parameter
Name Description
builderForValue ClassificationModelOptions.V2Model.Builder
Returns
Type Description
ClassificationModelOptions.Builder