com.google.cloud.automl.v1beta1.TextSentimentProto Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-automl-v1beta1 Show documentation
Show all versions of proto-google-cloud-automl-v1beta1 Show documentation
PROTO library for proto-google-cloud-automl-v1beta1
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/automl/v1beta1/text_sentiment.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.automl.v1beta1;
public final class TextSentimentProto {
private TextSentimentProto() {}
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {}
public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface TextSentimentAnnotationOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSentimentAnnotation)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Output only. The sentiment with the semantic, as given to the
* [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
* for the prediction had been trained.
* The sentiment values are between 0 and
* Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
* with higher value meaning more positive sentiment. They are completely
* relative, i.e. 0 means least positive sentiment and sentiment_max means
* the most positive from the sentiments present in the train data. Therefore
* e.g. if train data had only negative sentiment, then sentiment_max, would
* be still negative (although least negative).
* The sentiment shouldn't be confused with "score" or "magnitude"
* from the previous Natural Language Sentiment Analysis API.
*
*
* int32 sentiment = 1;
*
* @return The sentiment.
*/
int getSentiment();
}
/**
*
*
*
* Contains annotation details specific to text sentiment.
*
*
* Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentAnnotation}
*/
public static final class TextSentimentAnnotation extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSentimentAnnotation)
TextSentimentAnnotationOrBuilder {
private static final long serialVersionUID = 0L;
// Use TextSentimentAnnotation.newBuilder() to construct.
private TextSentimentAnnotation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TextSentimentAnnotation() {}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TextSentimentAnnotation();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.class,
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder
.class);
}
public static final int SENTIMENT_FIELD_NUMBER = 1;
private int sentiment_ = 0;
/**
*
*
*
* Output only. The sentiment with the semantic, as given to the
* [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
* for the prediction had been trained.
* The sentiment values are between 0 and
* Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
* with higher value meaning more positive sentiment. They are completely
* relative, i.e. 0 means least positive sentiment and sentiment_max means
* the most positive from the sentiments present in the train data. Therefore
* e.g. if train data had only negative sentiment, then sentiment_max, would
* be still negative (although least negative).
* The sentiment shouldn't be confused with "score" or "magnitude"
* from the previous Natural Language Sentiment Analysis API.
*
*
* int32 sentiment = 1;
*
* @return The sentiment.
*/
@java.lang.Override
public int getSentiment() {
return sentiment_;
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (sentiment_ != 0) {
output.writeInt32(1, sentiment_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (sentiment_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, sentiment_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation)) {
return super.equals(obj);
}
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation other =
(com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) obj;
if (getSentiment() != other.getSentiment()) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + SENTIMENT_FIELD_NUMBER;
hash = (53 * hash) + getSentiment();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Contains annotation details specific to text sentiment.
*
*
* Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentAnnotation}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSentimentAnnotation)
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.class,
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder
.class);
}
// Construct using
// com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
sentiment_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor;
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
getDefaultInstanceForType() {
return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation build() {
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
buildPartial() {
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation result =
new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.sentiment_ = sentiment_;
}
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) {
return mergeFrom(
(com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation other) {
if (other
== com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
.getDefaultInstance()) return this;
if (other.getSentiment() != 0) {
setSentiment(other.getSentiment());
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8:
{
sentiment_ = input.readInt32();
bitField0_ |= 0x00000001;
break;
} // case 8
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private int sentiment_;
/**
*
*
*
* Output only. The sentiment with the semantic, as given to the
* [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
* for the prediction had been trained.
* The sentiment values are between 0 and
* Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
* with higher value meaning more positive sentiment. They are completely
* relative, i.e. 0 means least positive sentiment and sentiment_max means
* the most positive from the sentiments present in the train data. Therefore
* e.g. if train data had only negative sentiment, then sentiment_max, would
* be still negative (although least negative).
* The sentiment shouldn't be confused with "score" or "magnitude"
* from the previous Natural Language Sentiment Analysis API.
*
*
* int32 sentiment = 1;
*
* @return The sentiment.
*/
@java.lang.Override
public int getSentiment() {
return sentiment_;
}
/**
*
*
*
* Output only. The sentiment with the semantic, as given to the
* [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
* for the prediction had been trained.
* The sentiment values are between 0 and
* Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
* with higher value meaning more positive sentiment. They are completely
* relative, i.e. 0 means least positive sentiment and sentiment_max means
* the most positive from the sentiments present in the train data. Therefore
* e.g. if train data had only negative sentiment, then sentiment_max, would
* be still negative (although least negative).
* The sentiment shouldn't be confused with "score" or "magnitude"
* from the previous Natural Language Sentiment Analysis API.
*
*
* int32 sentiment = 1;
*
* @param value The sentiment to set.
* @return This builder for chaining.
*/
public Builder setSentiment(int value) {
sentiment_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. The sentiment with the semantic, as given to the
* [AutoMl.ImportData][google.cloud.automl.v1beta1.AutoMl.ImportData] when populating the dataset from which the model used
* for the prediction had been trained.
* The sentiment values are between 0 and
* Dataset.text_sentiment_dataset_metadata.sentiment_max (inclusive),
* with higher value meaning more positive sentiment. They are completely
* relative, i.e. 0 means least positive sentiment and sentiment_max means
* the most positive from the sentiments present in the train data. Therefore
* e.g. if train data had only negative sentiment, then sentiment_max, would
* be still negative (although least negative).
* The sentiment shouldn't be confused with "score" or "magnitude"
* from the previous Natural Language Sentiment Analysis API.
*
*
* int32 sentiment = 1;
*
* @return This builder for chaining.
*/
public Builder clearSentiment() {
bitField0_ = (bitField0_ & ~0x00000001);
sentiment_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextSentimentAnnotation)
}
// @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSentimentAnnotation)
private static final com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation();
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TextSentimentAnnotation parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface TextSentimentEvaluationMetricsOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Output only. Precision.
*
*
* float precision = 1;
*
* @return The precision.
*/
float getPrecision();
/**
*
*
*
* Output only. Recall.
*
*
* float recall = 2;
*
* @return The recall.
*/
float getRecall();
/**
*
*
*
* Output only. The harmonic mean of recall and precision.
*
*
* float f1_score = 3;
*
* @return The f1Score.
*/
float getF1Score();
/**
*
*
*
* Output only. Mean absolute error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_absolute_error = 4;
*
* @return The meanAbsoluteError.
*/
float getMeanAbsoluteError();
/**
*
*
*
* Output only. Mean squared error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_squared_error = 5;
*
* @return The meanSquaredError.
*/
float getMeanSquaredError();
/**
*
*
*
* Output only. Linear weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float linear_kappa = 6;
*
* @return The linearKappa.
*/
float getLinearKappa();
/**
*
*
*
* Output only. Quadratic weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float quadratic_kappa = 7;
*
* @return The quadraticKappa.
*/
float getQuadraticKappa();
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*
* @return Whether the confusionMatrix field is set.
*/
boolean hasConfusionMatrix();
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*
* @return The confusionMatrix.
*/
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
getConfusionMatrix();
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrixOrBuilder
getConfusionMatrixOrBuilder();
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return A list containing the annotationSpecId.
*/
@java.lang.Deprecated
java.util.List getAnnotationSpecIdList();
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return The count of annotationSpecId.
*/
@java.lang.Deprecated
int getAnnotationSpecIdCount();
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index of the element to return.
* @return The annotationSpecId at the given index.
*/
@java.lang.Deprecated
java.lang.String getAnnotationSpecId(int index);
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index of the value to return.
* @return The bytes of the annotationSpecId at the given index.
*/
@java.lang.Deprecated
com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index);
}
/**
*
*
*
* Model evaluation metrics for text sentiment problems.
*
*
* Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics}
*/
public static final class TextSentimentEvaluationMetrics
extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics)
TextSentimentEvaluationMetricsOrBuilder {
private static final long serialVersionUID = 0L;
// Use TextSentimentEvaluationMetrics.newBuilder() to construct.
private TextSentimentEvaluationMetrics(
com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private TextSentimentEvaluationMetrics() {
annotationSpecId_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new TextSentimentEvaluationMetrics();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
.class,
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
.Builder.class);
}
private int bitField0_;
public static final int PRECISION_FIELD_NUMBER = 1;
private float precision_ = 0F;
/**
*
*
*
* Output only. Precision.
*
*
* float precision = 1;
*
* @return The precision.
*/
@java.lang.Override
public float getPrecision() {
return precision_;
}
public static final int RECALL_FIELD_NUMBER = 2;
private float recall_ = 0F;
/**
*
*
*
* Output only. Recall.
*
*
* float recall = 2;
*
* @return The recall.
*/
@java.lang.Override
public float getRecall() {
return recall_;
}
public static final int F1_SCORE_FIELD_NUMBER = 3;
private float f1Score_ = 0F;
/**
*
*
*
* Output only. The harmonic mean of recall and precision.
*
*
* float f1_score = 3;
*
* @return The f1Score.
*/
@java.lang.Override
public float getF1Score() {
return f1Score_;
}
public static final int MEAN_ABSOLUTE_ERROR_FIELD_NUMBER = 4;
private float meanAbsoluteError_ = 0F;
/**
*
*
*
* Output only. Mean absolute error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_absolute_error = 4;
*
* @return The meanAbsoluteError.
*/
@java.lang.Override
public float getMeanAbsoluteError() {
return meanAbsoluteError_;
}
public static final int MEAN_SQUARED_ERROR_FIELD_NUMBER = 5;
private float meanSquaredError_ = 0F;
/**
*
*
*
* Output only. Mean squared error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_squared_error = 5;
*
* @return The meanSquaredError.
*/
@java.lang.Override
public float getMeanSquaredError() {
return meanSquaredError_;
}
public static final int LINEAR_KAPPA_FIELD_NUMBER = 6;
private float linearKappa_ = 0F;
/**
*
*
*
* Output only. Linear weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float linear_kappa = 6;
*
* @return The linearKappa.
*/
@java.lang.Override
public float getLinearKappa() {
return linearKappa_;
}
public static final int QUADRATIC_KAPPA_FIELD_NUMBER = 7;
private float quadraticKappa_ = 0F;
/**
*
*
*
* Output only. Quadratic weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float quadratic_kappa = 7;
*
* @return The quadraticKappa.
*/
@java.lang.Override
public float getQuadraticKappa() {
return quadraticKappa_;
}
public static final int CONFUSION_MATRIX_FIELD_NUMBER = 8;
private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
confusionMatrix_;
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*
* @return Whether the confusionMatrix field is set.
*/
@java.lang.Override
public boolean hasConfusionMatrix() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*
* @return The confusionMatrix.
*/
@java.lang.Override
public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
getConfusionMatrix() {
return confusionMatrix_ == null
? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.getDefaultInstance()
: confusionMatrix_;
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
@java.lang.Override
public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrixOrBuilder
getConfusionMatrixOrBuilder() {
return confusionMatrix_ == null
? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.getDefaultInstance()
: confusionMatrix_;
}
public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 9;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList annotationSpecId_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return A list containing the annotationSpecId.
*/
@java.lang.Deprecated
public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() {
return annotationSpecId_;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return The count of annotationSpecId.
*/
@java.lang.Deprecated
public int getAnnotationSpecIdCount() {
return annotationSpecId_.size();
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index of the element to return.
* @return The annotationSpecId at the given index.
*/
@java.lang.Deprecated
public java.lang.String getAnnotationSpecId(int index) {
return annotationSpecId_.get(index);
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id is
* deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index of the value to return.
* @return The bytes of the annotationSpecId at the given index.
*/
@java.lang.Deprecated
public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) {
return annotationSpecId_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (java.lang.Float.floatToRawIntBits(precision_) != 0) {
output.writeFloat(1, precision_);
}
if (java.lang.Float.floatToRawIntBits(recall_) != 0) {
output.writeFloat(2, recall_);
}
if (java.lang.Float.floatToRawIntBits(f1Score_) != 0) {
output.writeFloat(3, f1Score_);
}
if (java.lang.Float.floatToRawIntBits(meanAbsoluteError_) != 0) {
output.writeFloat(4, meanAbsoluteError_);
}
if (java.lang.Float.floatToRawIntBits(meanSquaredError_) != 0) {
output.writeFloat(5, meanSquaredError_);
}
if (java.lang.Float.floatToRawIntBits(linearKappa_) != 0) {
output.writeFloat(6, linearKappa_);
}
if (java.lang.Float.floatToRawIntBits(quadraticKappa_) != 0) {
output.writeFloat(7, quadraticKappa_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(8, getConfusionMatrix());
}
for (int i = 0; i < annotationSpecId_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, annotationSpecId_.getRaw(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Float.floatToRawIntBits(precision_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(1, precision_);
}
if (java.lang.Float.floatToRawIntBits(recall_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, recall_);
}
if (java.lang.Float.floatToRawIntBits(f1Score_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(3, f1Score_);
}
if (java.lang.Float.floatToRawIntBits(meanAbsoluteError_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(4, meanAbsoluteError_);
}
if (java.lang.Float.floatToRawIntBits(meanSquaredError_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(5, meanSquaredError_);
}
if (java.lang.Float.floatToRawIntBits(linearKappa_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(6, linearKappa_);
}
if (java.lang.Float.floatToRawIntBits(quadraticKappa_) != 0) {
size += com.google.protobuf.CodedOutputStream.computeFloatSize(7, quadraticKappa_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getConfusionMatrix());
}
{
int dataSize = 0;
for (int i = 0; i < annotationSpecId_.size(); i++) {
dataSize += computeStringSizeNoTag(annotationSpecId_.getRaw(i));
}
size += dataSize;
size += 1 * getAnnotationSpecIdList().size();
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj
instanceof
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics)) {
return super.equals(obj);
}
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics other =
(com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) obj;
if (java.lang.Float.floatToIntBits(getPrecision())
!= java.lang.Float.floatToIntBits(other.getPrecision())) return false;
if (java.lang.Float.floatToIntBits(getRecall())
!= java.lang.Float.floatToIntBits(other.getRecall())) return false;
if (java.lang.Float.floatToIntBits(getF1Score())
!= java.lang.Float.floatToIntBits(other.getF1Score())) return false;
if (java.lang.Float.floatToIntBits(getMeanAbsoluteError())
!= java.lang.Float.floatToIntBits(other.getMeanAbsoluteError())) return false;
if (java.lang.Float.floatToIntBits(getMeanSquaredError())
!= java.lang.Float.floatToIntBits(other.getMeanSquaredError())) return false;
if (java.lang.Float.floatToIntBits(getLinearKappa())
!= java.lang.Float.floatToIntBits(other.getLinearKappa())) return false;
if (java.lang.Float.floatToIntBits(getQuadraticKappa())
!= java.lang.Float.floatToIntBits(other.getQuadraticKappa())) return false;
if (hasConfusionMatrix() != other.hasConfusionMatrix()) return false;
if (hasConfusionMatrix()) {
if (!getConfusionMatrix().equals(other.getConfusionMatrix())) return false;
}
if (!getAnnotationSpecIdList().equals(other.getAnnotationSpecIdList())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + PRECISION_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getPrecision());
hash = (37 * hash) + RECALL_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getRecall());
hash = (37 * hash) + F1_SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getF1Score());
hash = (37 * hash) + MEAN_ABSOLUTE_ERROR_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanAbsoluteError());
hash = (37 * hash) + MEAN_SQUARED_ERROR_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getMeanSquaredError());
hash = (37 * hash) + LINEAR_KAPPA_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getLinearKappa());
hash = (37 * hash) + QUADRATIC_KAPPA_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(getQuadraticKappa());
if (hasConfusionMatrix()) {
hash = (37 * hash) + CONFUSION_MATRIX_FIELD_NUMBER;
hash = (53 * hash) + getConfusionMatrix().hashCode();
}
if (getAnnotationSpecIdCount() > 0) {
hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER;
hash = (53 * hash) + getAnnotationSpecIdList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseDelimitedFrom(
java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() {
return newBuilder();
}
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
*
*
* Model evaluation metrics for text sentiment problems.
*
*
* Protobuf type {@code google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics)
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetricsOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
.class,
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
.Builder.class);
}
// Construct using
// com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getConfusionMatrixFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
precision_ = 0F;
recall_ = 0F;
f1Score_ = 0F;
meanAbsoluteError_ = 0F;
meanSquaredError_ = 0F;
linearKappa_ = 0F;
quadraticKappa_ = 0F;
confusionMatrix_ = null;
if (confusionMatrixBuilder_ != null) {
confusionMatrixBuilder_.dispose();
confusionMatrixBuilder_ = null;
}
annotationSpecId_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.automl.v1beta1.TextSentimentProto
.internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor;
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
getDefaultInstanceForType() {
return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
build() {
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
buildPartial() {
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics result =
new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.precision_ = precision_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.recall_ = recall_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.f1Score_ = f1Score_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.meanAbsoluteError_ = meanAbsoluteError_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.meanSquaredError_ = meanSquaredError_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.linearKappa_ = linearKappa_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.quadraticKappa_ = quadraticKappa_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000080) != 0)) {
result.confusionMatrix_ =
confusionMatrixBuilder_ == null ? confusionMatrix_ : confusionMatrixBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
annotationSpecId_.makeImmutable();
result.annotationSpecId_ = annotationSpecId_;
}
result.bitField0_ |= to_bitField0_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index,
java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other
instanceof
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics) {
return mergeFrom(
(com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics other) {
if (other
== com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
.getDefaultInstance()) return this;
if (other.getPrecision() != 0F) {
setPrecision(other.getPrecision());
}
if (other.getRecall() != 0F) {
setRecall(other.getRecall());
}
if (other.getF1Score() != 0F) {
setF1Score(other.getF1Score());
}
if (other.getMeanAbsoluteError() != 0F) {
setMeanAbsoluteError(other.getMeanAbsoluteError());
}
if (other.getMeanSquaredError() != 0F) {
setMeanSquaredError(other.getMeanSquaredError());
}
if (other.getLinearKappa() != 0F) {
setLinearKappa(other.getLinearKappa());
}
if (other.getQuadraticKappa() != 0F) {
setQuadraticKappa(other.getQuadraticKappa());
}
if (other.hasConfusionMatrix()) {
mergeConfusionMatrix(other.getConfusionMatrix());
}
if (!other.annotationSpecId_.isEmpty()) {
if (annotationSpecId_.isEmpty()) {
annotationSpecId_ = other.annotationSpecId_;
bitField0_ |= 0x00000100;
} else {
ensureAnnotationSpecIdIsMutable();
annotationSpecId_.addAll(other.annotationSpecId_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 13:
{
precision_ = input.readFloat();
bitField0_ |= 0x00000001;
break;
} // case 13
case 21:
{
recall_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
} // case 21
case 29:
{
f1Score_ = input.readFloat();
bitField0_ |= 0x00000004;
break;
} // case 29
case 37:
{
meanAbsoluteError_ = input.readFloat();
bitField0_ |= 0x00000008;
break;
} // case 37
case 45:
{
meanSquaredError_ = input.readFloat();
bitField0_ |= 0x00000010;
break;
} // case 45
case 53:
{
linearKappa_ = input.readFloat();
bitField0_ |= 0x00000020;
break;
} // case 53
case 61:
{
quadraticKappa_ = input.readFloat();
bitField0_ |= 0x00000040;
break;
} // case 61
case 66:
{
input.readMessage(
getConfusionMatrixFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 74:
{
java.lang.String s = input.readStringRequireUtf8();
ensureAnnotationSpecIdIsMutable();
annotationSpecId_.add(s);
break;
} // case 74
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private float precision_;
/**
*
*
*
* Output only. Precision.
*
*
* float precision = 1;
*
* @return The precision.
*/
@java.lang.Override
public float getPrecision() {
return precision_;
}
/**
*
*
*
* Output only. Precision.
*
*
* float precision = 1;
*
* @param value The precision to set.
* @return This builder for chaining.
*/
public Builder setPrecision(float value) {
precision_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Output only. Precision.
*
*
* float precision = 1;
*
* @return This builder for chaining.
*/
public Builder clearPrecision() {
bitField0_ = (bitField0_ & ~0x00000001);
precision_ = 0F;
onChanged();
return this;
}
private float recall_;
/**
*
*
*
* Output only. Recall.
*
*
* float recall = 2;
*
* @return The recall.
*/
@java.lang.Override
public float getRecall() {
return recall_;
}
/**
*
*
*
* Output only. Recall.
*
*
* float recall = 2;
*
* @param value The recall to set.
* @return This builder for chaining.
*/
public Builder setRecall(float value) {
recall_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Output only. Recall.
*
*
* float recall = 2;
*
* @return This builder for chaining.
*/
public Builder clearRecall() {
bitField0_ = (bitField0_ & ~0x00000002);
recall_ = 0F;
onChanged();
return this;
}
private float f1Score_;
/**
*
*
*
* Output only. The harmonic mean of recall and precision.
*
*
* float f1_score = 3;
*
* @return The f1Score.
*/
@java.lang.Override
public float getF1Score() {
return f1Score_;
}
/**
*
*
*
* Output only. The harmonic mean of recall and precision.
*
*
* float f1_score = 3;
*
* @param value The f1Score to set.
* @return This builder for chaining.
*/
public Builder setF1Score(float value) {
f1Score_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Output only. The harmonic mean of recall and precision.
*
*
* float f1_score = 3;
*
* @return This builder for chaining.
*/
public Builder clearF1Score() {
bitField0_ = (bitField0_ & ~0x00000004);
f1Score_ = 0F;
onChanged();
return this;
}
private float meanAbsoluteError_;
/**
*
*
*
* Output only. Mean absolute error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_absolute_error = 4;
*
* @return The meanAbsoluteError.
*/
@java.lang.Override
public float getMeanAbsoluteError() {
return meanAbsoluteError_;
}
/**
*
*
*
* Output only. Mean absolute error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_absolute_error = 4;
*
* @param value The meanAbsoluteError to set.
* @return This builder for chaining.
*/
public Builder setMeanAbsoluteError(float value) {
meanAbsoluteError_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Output only. Mean absolute error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_absolute_error = 4;
*
* @return This builder for chaining.
*/
public Builder clearMeanAbsoluteError() {
bitField0_ = (bitField0_ & ~0x00000008);
meanAbsoluteError_ = 0F;
onChanged();
return this;
}
private float meanSquaredError_;
/**
*
*
*
* Output only. Mean squared error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_squared_error = 5;
*
* @return The meanSquaredError.
*/
@java.lang.Override
public float getMeanSquaredError() {
return meanSquaredError_;
}
/**
*
*
*
* Output only. Mean squared error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_squared_error = 5;
*
* @param value The meanSquaredError to set.
* @return This builder for chaining.
*/
public Builder setMeanSquaredError(float value) {
meanSquaredError_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* Output only. Mean squared error. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float mean_squared_error = 5;
*
* @return This builder for chaining.
*/
public Builder clearMeanSquaredError() {
bitField0_ = (bitField0_ & ~0x00000010);
meanSquaredError_ = 0F;
onChanged();
return this;
}
private float linearKappa_;
/**
*
*
*
* Output only. Linear weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float linear_kappa = 6;
*
* @return The linearKappa.
*/
@java.lang.Override
public float getLinearKappa() {
return linearKappa_;
}
/**
*
*
*
* Output only. Linear weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float linear_kappa = 6;
*
* @param value The linearKappa to set.
* @return This builder for chaining.
*/
public Builder setLinearKappa(float value) {
linearKappa_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. Linear weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float linear_kappa = 6;
*
* @return This builder for chaining.
*/
public Builder clearLinearKappa() {
bitField0_ = (bitField0_ & ~0x00000020);
linearKappa_ = 0F;
onChanged();
return this;
}
private float quadraticKappa_;
/**
*
*
*
* Output only. Quadratic weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float quadratic_kappa = 7;
*
* @return The quadraticKappa.
*/
@java.lang.Override
public float getQuadraticKappa() {
return quadraticKappa_;
}
/**
*
*
*
* Output only. Quadratic weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float quadratic_kappa = 7;
*
* @param value The quadraticKappa to set.
* @return This builder for chaining.
*/
public Builder setQuadraticKappa(float value) {
quadraticKappa_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Output only. Quadratic weighted kappa. Only set for the overall model
* evaluation, not for evaluation of a single annotation spec.
*
*
* float quadratic_kappa = 7;
*
* @return This builder for chaining.
*/
public Builder clearQuadraticKappa() {
bitField0_ = (bitField0_ & ~0x00000040);
quadraticKappa_ = 0F;
onChanged();
return this;
}
private com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
confusionMatrix_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix,
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.Builder,
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrixOrBuilder>
confusionMatrixBuilder_;
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*
* @return Whether the confusionMatrix field is set.
*/
public boolean hasConfusionMatrix() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*
* @return The confusionMatrix.
*/
public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
getConfusionMatrix() {
if (confusionMatrixBuilder_ == null) {
return confusionMatrix_ == null
? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.getDefaultInstance()
: confusionMatrix_;
} else {
return confusionMatrixBuilder_.getMessage();
}
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
public Builder setConfusionMatrix(
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
value) {
if (confusionMatrixBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
confusionMatrix_ = value;
} else {
confusionMatrixBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
public Builder setConfusionMatrix(
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.Builder
builderForValue) {
if (confusionMatrixBuilder_ == null) {
confusionMatrix_ = builderForValue.build();
} else {
confusionMatrixBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
public Builder mergeConfusionMatrix(
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix
value) {
if (confusionMatrixBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0)
&& confusionMatrix_ != null
&& confusionMatrix_
!= com.google.cloud.automl.v1beta1.ClassificationProto
.ClassificationEvaluationMetrics.ConfusionMatrix.getDefaultInstance()) {
getConfusionMatrixBuilder().mergeFrom(value);
} else {
confusionMatrix_ = value;
}
} else {
confusionMatrixBuilder_.mergeFrom(value);
}
if (confusionMatrix_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
public Builder clearConfusionMatrix() {
bitField0_ = (bitField0_ & ~0x00000080);
confusionMatrix_ = null;
if (confusionMatrixBuilder_ != null) {
confusionMatrixBuilder_.dispose();
confusionMatrixBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.Builder
getConfusionMatrixBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getConfusionMatrixFieldBuilder().getBuilder();
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrixOrBuilder
getConfusionMatrixOrBuilder() {
if (confusionMatrixBuilder_ != null) {
return confusionMatrixBuilder_.getMessageOrBuilder();
} else {
return confusionMatrix_ == null
? com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.getDefaultInstance()
: confusionMatrix_;
}
}
/**
*
*
*
* Output only. Confusion matrix of the evaluation.
* Only set for the overall model evaluation, not for evaluation of a single
* annotation spec.
*
*
*
* .google.cloud.automl.v1beta1.ClassificationEvaluationMetrics.ConfusionMatrix confusion_matrix = 8;
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix,
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrix.Builder,
com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationEvaluationMetrics
.ConfusionMatrixOrBuilder>
getConfusionMatrixFieldBuilder() {
if (confusionMatrixBuilder_ == null) {
confusionMatrixBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.automl.v1beta1.ClassificationProto
.ClassificationEvaluationMetrics.ConfusionMatrix,
com.google.cloud.automl.v1beta1.ClassificationProto
.ClassificationEvaluationMetrics.ConfusionMatrix.Builder,
com.google.cloud.automl.v1beta1.ClassificationProto
.ClassificationEvaluationMetrics.ConfusionMatrixOrBuilder>(
getConfusionMatrix(), getParentForChildren(), isClean());
confusionMatrix_ = null;
}
return confusionMatrixBuilder_;
}
private com.google.protobuf.LazyStringArrayList annotationSpecId_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureAnnotationSpecIdIsMutable() {
if (!annotationSpecId_.isModifiable()) {
annotationSpecId_ = new com.google.protobuf.LazyStringArrayList(annotationSpecId_);
}
bitField0_ |= 0x00000100;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return A list containing the annotationSpecId.
*/
@java.lang.Deprecated
public com.google.protobuf.ProtocolStringList getAnnotationSpecIdList() {
annotationSpecId_.makeImmutable();
return annotationSpecId_;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return The count of annotationSpecId.
*/
@java.lang.Deprecated
public int getAnnotationSpecIdCount() {
return annotationSpecId_.size();
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index of the element to return.
* @return The annotationSpecId at the given index.
*/
@java.lang.Deprecated
public java.lang.String getAnnotationSpecId(int index) {
return annotationSpecId_.get(index);
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index of the value to return.
* @return The bytes of the annotationSpecId at the given index.
*/
@java.lang.Deprecated
public com.google.protobuf.ByteString getAnnotationSpecIdBytes(int index) {
return annotationSpecId_.getByteString(index);
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param index The index to set the value at.
* @param value The annotationSpecId to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setAnnotationSpecId(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationSpecIdIsMutable();
annotationSpecId_.set(index, value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param value The annotationSpecId to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder addAnnotationSpecId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureAnnotationSpecIdIsMutable();
annotationSpecId_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param values The annotationSpecId to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder addAllAnnotationSpecId(java.lang.Iterable values) {
ensureAnnotationSpecIdIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, annotationSpecId_);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearAnnotationSpecId() {
annotationSpecId_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000100);
;
onChanged();
return this;
}
/**
*
*
*
* Output only. The annotation spec ids used for this evaluation.
* Deprecated .
*
*
* repeated string annotation_spec_id = 9 [deprecated = true];
*
* @deprecated google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics.annotation_spec_id
* is deprecated. See google/cloud/automl/v1beta1/text_sentiment.proto;l=77
* @param value The bytes of the annotationSpecId to add.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder addAnnotationSpecIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureAnnotationSpecIdIsMutable();
annotationSpecId_.add(value);
bitField0_ |= 0x00000100;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics)
}
// @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.TextSentimentEvaluationMetrics)
private static final com.google.cloud.automl.v1beta1.TextSentimentProto
.TextSentimentEvaluationMetrics
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics();
}
public static com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public TextSentimentEvaluationMetrics parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException()
.setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentEvaluationMetrics
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor;
private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor descriptor;
static {
java.lang.String[] descriptorData = {
"\n0google/cloud/automl/v1beta1/text_senti"
+ "ment.proto\022\033google.cloud.automl.v1beta1\032"
+ "0google/cloud/automl/v1beta1/classificat"
+ "ion.proto\",\n\027TextSentimentAnnotation\022\021\n\t"
+ "sentiment\030\001 \001(\005\"\305\002\n\036TextSentimentEvaluat"
+ "ionMetrics\022\021\n\tprecision\030\001 \001(\002\022\016\n\006recall\030"
+ "\002 \001(\002\022\020\n\010f1_score\030\003 \001(\002\022\033\n\023mean_absolute"
+ "_error\030\004 \001(\002\022\032\n\022mean_squared_error\030\005 \001(\002"
+ "\022\024\n\014linear_kappa\030\006 \001(\002\022\027\n\017quadratic_kapp"
+ "a\030\007 \001(\002\022f\n\020confusion_matrix\030\010 \001(\0132L.goog"
+ "le.cloud.automl.v1beta1.ClassificationEv"
+ "aluationMetrics.ConfusionMatrix\022\036\n\022annot"
+ "ation_spec_id\030\t \003(\tB\002\030\001B\255\001\n\037com.google.c"
+ "loud.automl.v1beta1B\022TextSentimentProtoZ"
+ "7cloud.google.com/go/automl/apiv1beta1/a"
+ "utomlpb;automlpb\312\002\033Google\\Cloud\\AutoMl\\V"
+ "1beta1\352\002\036Google::Cloud::AutoML::V1beta1b"
+ "\006proto3"
};
descriptor =
com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor(),
});
internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_automl_v1beta1_TextSentimentAnnotation_descriptor,
new java.lang.String[] {
"Sentiment",
});
internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_fieldAccessorTable =
new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_google_cloud_automl_v1beta1_TextSentimentEvaluationMetrics_descriptor,
new java.lang.String[] {
"Precision",
"Recall",
"F1Score",
"MeanAbsoluteError",
"MeanSquaredError",
"LinearKappa",
"QuadraticKappa",
"ConfusionMatrix",
"AnnotationSpecId",
});
com.google.cloud.automl.v1beta1.ClassificationProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}