Class ClassificationModelOptions.Builder (2.16.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
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public ClassificationModelOptions.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

build()

public ClassificationModelOptions build()
Returns
TypeDescription
ClassificationModelOptions

buildPartial()

public ClassificationModelOptions buildPartial()
Returns
TypeDescription
ClassificationModelOptions

clear()

public ClassificationModelOptions.Builder clear()
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public ClassificationModelOptions.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

clearModelType()

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

clearOneof(Descriptors.OneofDescriptor oneof)

public ClassificationModelOptions.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
ClassificationModelOptions.Builder

clone()

public ClassificationModelOptions.Builder clone()
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

getDefaultInstanceForType()

public ClassificationModelOptions getDefaultInstanceForType()
Returns
TypeDescription
ClassificationModelOptions

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getModelTypeCase()

public ClassificationModelOptions.ModelTypeCase getModelTypeCase()
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
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.

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

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(ClassificationModelOptions other)

public ClassificationModelOptions.Builder mergeFrom(ClassificationModelOptions other)
Parameter
NameDescription
otherClassificationModelOptions
Returns
TypeDescription
ClassificationModelOptions.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public ClassificationModelOptions.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public ClassificationModelOptions.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final ClassificationModelOptions.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueClassificationModelOptions.V1Model
Returns
TypeDescription
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
NameDescription
valueClassificationModelOptions.V2Model
Returns
TypeDescription
ClassificationModelOptions.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public ClassificationModelOptions.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

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

public ClassificationModelOptions.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
ClassificationModelOptions.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final ClassificationModelOptions.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
valueClassificationModelOptions.V1Model
Returns
TypeDescription
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
NameDescription
builderForValueClassificationModelOptions.V1Model.Builder
Returns
TypeDescription
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
NameDescription
valueClassificationModelOptions.V2Model
Returns
TypeDescription
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
NameDescription
builderForValueClassificationModelOptions.V2Model.Builder
Returns
TypeDescription
ClassificationModelOptions.Builder