1 /* 2 * Copyright 2020 Google LLC 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * https://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 // Generated by the protocol buffer compiler. DO NOT EDIT! 17 // source: google/cloud/automl/v1/model_evaluation.proto 18 19 package com.google.cloud.automl.v1; 20 21 /** 22 * 23 * 24 * <pre> 25 * Evaluation results of a model. 26 * </pre> 27 * 28 * Protobuf type {@code google.cloud.automl.v1.ModelEvaluation} 29 */ 30 public final class ModelEvaluation extends com.google.protobuf.GeneratedMessageV3 31 implements 32 // @@protoc_insertion_point(message_implements:google.cloud.automl.v1.ModelEvaluation) 33 ModelEvaluationOrBuilder { 34 private static final long serialVersionUID = 0L; 35 // Use ModelEvaluation.newBuilder() to construct. ModelEvaluation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder)36 private ModelEvaluation(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) { 37 super(builder); 38 } 39 ModelEvaluation()40 private ModelEvaluation() { 41 name_ = ""; 42 annotationSpecId_ = ""; 43 displayName_ = ""; 44 } 45 46 @java.lang.Override 47 @SuppressWarnings({"unused"}) newInstance(UnusedPrivateParameter unused)48 protected java.lang.Object newInstance(UnusedPrivateParameter unused) { 49 return new ModelEvaluation(); 50 } 51 52 @java.lang.Override getUnknownFields()53 public final com.google.protobuf.UnknownFieldSet getUnknownFields() { 54 return this.unknownFields; 55 } 56 getDescriptor()57 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 58 return com.google.cloud.automl.v1.ModelEvaluationOuterClass 59 .internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; 60 } 61 62 @java.lang.Override 63 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()64 internalGetFieldAccessorTable() { 65 return com.google.cloud.automl.v1.ModelEvaluationOuterClass 66 .internal_static_google_cloud_automl_v1_ModelEvaluation_fieldAccessorTable 67 .ensureFieldAccessorsInitialized( 68 com.google.cloud.automl.v1.ModelEvaluation.class, 69 com.google.cloud.automl.v1.ModelEvaluation.Builder.class); 70 } 71 72 private int metricsCase_ = 0; 73 private java.lang.Object metrics_; 74 75 public enum MetricsCase 76 implements 77 com.google.protobuf.Internal.EnumLite, 78 com.google.protobuf.AbstractMessage.InternalOneOfEnum { 79 CLASSIFICATION_EVALUATION_METRICS(8), 80 TRANSLATION_EVALUATION_METRICS(9), 81 IMAGE_OBJECT_DETECTION_EVALUATION_METRICS(12), 82 TEXT_SENTIMENT_EVALUATION_METRICS(11), 83 TEXT_EXTRACTION_EVALUATION_METRICS(13), 84 METRICS_NOT_SET(0); 85 private final int value; 86 MetricsCase(int value)87 private MetricsCase(int value) { 88 this.value = value; 89 } 90 /** 91 * @param value The number of the enum to look for. 92 * @return The enum associated with the given number. 93 * @deprecated Use {@link #forNumber(int)} instead. 94 */ 95 @java.lang.Deprecated valueOf(int value)96 public static MetricsCase valueOf(int value) { 97 return forNumber(value); 98 } 99 forNumber(int value)100 public static MetricsCase forNumber(int value) { 101 switch (value) { 102 case 8: 103 return CLASSIFICATION_EVALUATION_METRICS; 104 case 9: 105 return TRANSLATION_EVALUATION_METRICS; 106 case 12: 107 return IMAGE_OBJECT_DETECTION_EVALUATION_METRICS; 108 case 11: 109 return TEXT_SENTIMENT_EVALUATION_METRICS; 110 case 13: 111 return TEXT_EXTRACTION_EVALUATION_METRICS; 112 case 0: 113 return METRICS_NOT_SET; 114 default: 115 return null; 116 } 117 } 118 getNumber()119 public int getNumber() { 120 return this.value; 121 } 122 }; 123 getMetricsCase()124 public MetricsCase getMetricsCase() { 125 return MetricsCase.forNumber(metricsCase_); 126 } 127 128 public static final int CLASSIFICATION_EVALUATION_METRICS_FIELD_NUMBER = 8; 129 /** 130 * 131 * 132 * <pre> 133 * Model evaluation metrics for image, text, video and tables 134 * classification. 135 * Tables problem is considered a classification when the target column 136 * is CATEGORY DataType. 137 * </pre> 138 * 139 * <code> 140 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 141 * </code> 142 * 143 * @return Whether the classificationEvaluationMetrics field is set. 144 */ 145 @java.lang.Override hasClassificationEvaluationMetrics()146 public boolean hasClassificationEvaluationMetrics() { 147 return metricsCase_ == 8; 148 } 149 /** 150 * 151 * 152 * <pre> 153 * Model evaluation metrics for image, text, video and tables 154 * classification. 155 * Tables problem is considered a classification when the target column 156 * is CATEGORY DataType. 157 * </pre> 158 * 159 * <code> 160 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 161 * </code> 162 * 163 * @return The classificationEvaluationMetrics. 164 */ 165 @java.lang.Override 166 public com.google.cloud.automl.v1.ClassificationEvaluationMetrics getClassificationEvaluationMetrics()167 getClassificationEvaluationMetrics() { 168 if (metricsCase_ == 8) { 169 return (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_; 170 } 171 return com.google.cloud.automl.v1.ClassificationEvaluationMetrics.getDefaultInstance(); 172 } 173 /** 174 * 175 * 176 * <pre> 177 * Model evaluation metrics for image, text, video and tables 178 * classification. 179 * Tables problem is considered a classification when the target column 180 * is CATEGORY DataType. 181 * </pre> 182 * 183 * <code> 184 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 185 * </code> 186 */ 187 @java.lang.Override 188 public com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder getClassificationEvaluationMetricsOrBuilder()189 getClassificationEvaluationMetricsOrBuilder() { 190 if (metricsCase_ == 8) { 191 return (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_; 192 } 193 return com.google.cloud.automl.v1.ClassificationEvaluationMetrics.getDefaultInstance(); 194 } 195 196 public static final int TRANSLATION_EVALUATION_METRICS_FIELD_NUMBER = 9; 197 /** 198 * 199 * 200 * <pre> 201 * Model evaluation metrics for translation. 202 * </pre> 203 * 204 * <code>.google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 205 * </code> 206 * 207 * @return Whether the translationEvaluationMetrics field is set. 208 */ 209 @java.lang.Override hasTranslationEvaluationMetrics()210 public boolean hasTranslationEvaluationMetrics() { 211 return metricsCase_ == 9; 212 } 213 /** 214 * 215 * 216 * <pre> 217 * Model evaluation metrics for translation. 218 * </pre> 219 * 220 * <code>.google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 221 * </code> 222 * 223 * @return The translationEvaluationMetrics. 224 */ 225 @java.lang.Override getTranslationEvaluationMetrics()226 public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEvaluationMetrics() { 227 if (metricsCase_ == 9) { 228 return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; 229 } 230 return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); 231 } 232 /** 233 * 234 * 235 * <pre> 236 * Model evaluation metrics for translation. 237 * </pre> 238 * 239 * <code>.google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 240 * </code> 241 */ 242 @java.lang.Override 243 public com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder getTranslationEvaluationMetricsOrBuilder()244 getTranslationEvaluationMetricsOrBuilder() { 245 if (metricsCase_ == 9) { 246 return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; 247 } 248 return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); 249 } 250 251 public static final int IMAGE_OBJECT_DETECTION_EVALUATION_METRICS_FIELD_NUMBER = 12; 252 /** 253 * 254 * 255 * <pre> 256 * Model evaluation metrics for image object detection. 257 * </pre> 258 * 259 * <code> 260 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 261 * </code> 262 * 263 * @return Whether the imageObjectDetectionEvaluationMetrics field is set. 264 */ 265 @java.lang.Override hasImageObjectDetectionEvaluationMetrics()266 public boolean hasImageObjectDetectionEvaluationMetrics() { 267 return metricsCase_ == 12; 268 } 269 /** 270 * 271 * 272 * <pre> 273 * Model evaluation metrics for image object detection. 274 * </pre> 275 * 276 * <code> 277 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 278 * </code> 279 * 280 * @return The imageObjectDetectionEvaluationMetrics. 281 */ 282 @java.lang.Override 283 public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics getImageObjectDetectionEvaluationMetrics()284 getImageObjectDetectionEvaluationMetrics() { 285 if (metricsCase_ == 12) { 286 return (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_; 287 } 288 return com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.getDefaultInstance(); 289 } 290 /** 291 * 292 * 293 * <pre> 294 * Model evaluation metrics for image object detection. 295 * </pre> 296 * 297 * <code> 298 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 299 * </code> 300 */ 301 @java.lang.Override 302 public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder getImageObjectDetectionEvaluationMetricsOrBuilder()303 getImageObjectDetectionEvaluationMetricsOrBuilder() { 304 if (metricsCase_ == 12) { 305 return (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_; 306 } 307 return com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.getDefaultInstance(); 308 } 309 310 public static final int TEXT_SENTIMENT_EVALUATION_METRICS_FIELD_NUMBER = 11; 311 /** 312 * 313 * 314 * <pre> 315 * Evaluation metrics for text sentiment models. 316 * </pre> 317 * 318 * <code> 319 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 320 * </code> 321 * 322 * @return Whether the textSentimentEvaluationMetrics field is set. 323 */ 324 @java.lang.Override hasTextSentimentEvaluationMetrics()325 public boolean hasTextSentimentEvaluationMetrics() { 326 return metricsCase_ == 11; 327 } 328 /** 329 * 330 * 331 * <pre> 332 * Evaluation metrics for text sentiment models. 333 * </pre> 334 * 335 * <code> 336 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 337 * </code> 338 * 339 * @return The textSentimentEvaluationMetrics. 340 */ 341 @java.lang.Override 342 public com.google.cloud.automl.v1.TextSentimentEvaluationMetrics getTextSentimentEvaluationMetrics()343 getTextSentimentEvaluationMetrics() { 344 if (metricsCase_ == 11) { 345 return (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_; 346 } 347 return com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance(); 348 } 349 /** 350 * 351 * 352 * <pre> 353 * Evaluation metrics for text sentiment models. 354 * </pre> 355 * 356 * <code> 357 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 358 * </code> 359 */ 360 @java.lang.Override 361 public com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder getTextSentimentEvaluationMetricsOrBuilder()362 getTextSentimentEvaluationMetricsOrBuilder() { 363 if (metricsCase_ == 11) { 364 return (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_; 365 } 366 return com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance(); 367 } 368 369 public static final int TEXT_EXTRACTION_EVALUATION_METRICS_FIELD_NUMBER = 13; 370 /** 371 * 372 * 373 * <pre> 374 * Evaluation metrics for text extraction models. 375 * </pre> 376 * 377 * <code> 378 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 379 * </code> 380 * 381 * @return Whether the textExtractionEvaluationMetrics field is set. 382 */ 383 @java.lang.Override hasTextExtractionEvaluationMetrics()384 public boolean hasTextExtractionEvaluationMetrics() { 385 return metricsCase_ == 13; 386 } 387 /** 388 * 389 * 390 * <pre> 391 * Evaluation metrics for text extraction models. 392 * </pre> 393 * 394 * <code> 395 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 396 * </code> 397 * 398 * @return The textExtractionEvaluationMetrics. 399 */ 400 @java.lang.Override 401 public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics getTextExtractionEvaluationMetrics()402 getTextExtractionEvaluationMetrics() { 403 if (metricsCase_ == 13) { 404 return (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_; 405 } 406 return com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.getDefaultInstance(); 407 } 408 /** 409 * 410 * 411 * <pre> 412 * Evaluation metrics for text extraction models. 413 * </pre> 414 * 415 * <code> 416 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 417 * </code> 418 */ 419 @java.lang.Override 420 public com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder getTextExtractionEvaluationMetricsOrBuilder()421 getTextExtractionEvaluationMetricsOrBuilder() { 422 if (metricsCase_ == 13) { 423 return (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_; 424 } 425 return com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.getDefaultInstance(); 426 } 427 428 public static final int NAME_FIELD_NUMBER = 1; 429 430 @SuppressWarnings("serial") 431 private volatile java.lang.Object name_ = ""; 432 /** 433 * 434 * 435 * <pre> 436 * Output only. Resource name of the model evaluation. 437 * Format: 438 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 439 * </pre> 440 * 441 * <code>string name = 1;</code> 442 * 443 * @return The name. 444 */ 445 @java.lang.Override getName()446 public java.lang.String getName() { 447 java.lang.Object ref = name_; 448 if (ref instanceof java.lang.String) { 449 return (java.lang.String) ref; 450 } else { 451 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 452 java.lang.String s = bs.toStringUtf8(); 453 name_ = s; 454 return s; 455 } 456 } 457 /** 458 * 459 * 460 * <pre> 461 * Output only. Resource name of the model evaluation. 462 * Format: 463 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 464 * </pre> 465 * 466 * <code>string name = 1;</code> 467 * 468 * @return The bytes for name. 469 */ 470 @java.lang.Override getNameBytes()471 public com.google.protobuf.ByteString getNameBytes() { 472 java.lang.Object ref = name_; 473 if (ref instanceof java.lang.String) { 474 com.google.protobuf.ByteString b = 475 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 476 name_ = b; 477 return b; 478 } else { 479 return (com.google.protobuf.ByteString) ref; 480 } 481 } 482 483 public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 2; 484 485 @SuppressWarnings("serial") 486 private volatile java.lang.Object annotationSpecId_ = ""; 487 /** 488 * 489 * 490 * <pre> 491 * Output only. The ID of the annotation spec that the model evaluation applies to. The 492 * The ID is empty for the overall model evaluation. 493 * For Tables annotation specs in the dataset do not exist and this ID is 494 * always not set, but for CLASSIFICATION 495 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 496 * the 497 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 498 * field is used. 499 * </pre> 500 * 501 * <code>string annotation_spec_id = 2;</code> 502 * 503 * @return The annotationSpecId. 504 */ 505 @java.lang.Override getAnnotationSpecId()506 public java.lang.String getAnnotationSpecId() { 507 java.lang.Object ref = annotationSpecId_; 508 if (ref instanceof java.lang.String) { 509 return (java.lang.String) ref; 510 } else { 511 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 512 java.lang.String s = bs.toStringUtf8(); 513 annotationSpecId_ = s; 514 return s; 515 } 516 } 517 /** 518 * 519 * 520 * <pre> 521 * Output only. The ID of the annotation spec that the model evaluation applies to. The 522 * The ID is empty for the overall model evaluation. 523 * For Tables annotation specs in the dataset do not exist and this ID is 524 * always not set, but for CLASSIFICATION 525 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 526 * the 527 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 528 * field is used. 529 * </pre> 530 * 531 * <code>string annotation_spec_id = 2;</code> 532 * 533 * @return The bytes for annotationSpecId. 534 */ 535 @java.lang.Override getAnnotationSpecIdBytes()536 public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { 537 java.lang.Object ref = annotationSpecId_; 538 if (ref instanceof java.lang.String) { 539 com.google.protobuf.ByteString b = 540 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 541 annotationSpecId_ = b; 542 return b; 543 } else { 544 return (com.google.protobuf.ByteString) ref; 545 } 546 } 547 548 public static final int DISPLAY_NAME_FIELD_NUMBER = 15; 549 550 @SuppressWarnings("serial") 551 private volatile java.lang.Object displayName_ = ""; 552 /** 553 * 554 * 555 * <pre> 556 * Output only. The value of 557 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 558 * at the moment when the model was trained. Because this field returns a 559 * value at model training time, for different models trained from the same 560 * dataset, the values may differ, since display names could had been changed 561 * between the two model's trainings. For Tables CLASSIFICATION 562 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 563 * distinct values of the target column at the moment of the model evaluation 564 * are populated here. 565 * The display_name is empty for the overall model evaluation. 566 * </pre> 567 * 568 * <code>string display_name = 15;</code> 569 * 570 * @return The displayName. 571 */ 572 @java.lang.Override getDisplayName()573 public java.lang.String getDisplayName() { 574 java.lang.Object ref = displayName_; 575 if (ref instanceof java.lang.String) { 576 return (java.lang.String) ref; 577 } else { 578 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 579 java.lang.String s = bs.toStringUtf8(); 580 displayName_ = s; 581 return s; 582 } 583 } 584 /** 585 * 586 * 587 * <pre> 588 * Output only. The value of 589 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 590 * at the moment when the model was trained. Because this field returns a 591 * value at model training time, for different models trained from the same 592 * dataset, the values may differ, since display names could had been changed 593 * between the two model's trainings. For Tables CLASSIFICATION 594 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 595 * distinct values of the target column at the moment of the model evaluation 596 * are populated here. 597 * The display_name is empty for the overall model evaluation. 598 * </pre> 599 * 600 * <code>string display_name = 15;</code> 601 * 602 * @return The bytes for displayName. 603 */ 604 @java.lang.Override getDisplayNameBytes()605 public com.google.protobuf.ByteString getDisplayNameBytes() { 606 java.lang.Object ref = displayName_; 607 if (ref instanceof java.lang.String) { 608 com.google.protobuf.ByteString b = 609 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 610 displayName_ = b; 611 return b; 612 } else { 613 return (com.google.protobuf.ByteString) ref; 614 } 615 } 616 617 public static final int CREATE_TIME_FIELD_NUMBER = 5; 618 private com.google.protobuf.Timestamp createTime_; 619 /** 620 * 621 * 622 * <pre> 623 * Output only. Timestamp when this model evaluation was created. 624 * </pre> 625 * 626 * <code>.google.protobuf.Timestamp create_time = 5;</code> 627 * 628 * @return Whether the createTime field is set. 629 */ 630 @java.lang.Override hasCreateTime()631 public boolean hasCreateTime() { 632 return createTime_ != null; 633 } 634 /** 635 * 636 * 637 * <pre> 638 * Output only. Timestamp when this model evaluation was created. 639 * </pre> 640 * 641 * <code>.google.protobuf.Timestamp create_time = 5;</code> 642 * 643 * @return The createTime. 644 */ 645 @java.lang.Override getCreateTime()646 public com.google.protobuf.Timestamp getCreateTime() { 647 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 648 } 649 /** 650 * 651 * 652 * <pre> 653 * Output only. Timestamp when this model evaluation was created. 654 * </pre> 655 * 656 * <code>.google.protobuf.Timestamp create_time = 5;</code> 657 */ 658 @java.lang.Override getCreateTimeOrBuilder()659 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 660 return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; 661 } 662 663 public static final int EVALUATED_EXAMPLE_COUNT_FIELD_NUMBER = 6; 664 private int evaluatedExampleCount_ = 0; 665 /** 666 * 667 * 668 * <pre> 669 * Output only. The number of examples used for model evaluation, i.e. for 670 * which ground truth from time of model creation is compared against the 671 * predicted annotations created by the model. 672 * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is 673 * the total number of all examples used for evaluation. 674 * Otherwise, this is the count of examples that according to the ground 675 * truth were annotated by the 676 * [annotation_spec_id][google.cloud.automl.v1.ModelEvaluation.annotation_spec_id]. 677 * </pre> 678 * 679 * <code>int32 evaluated_example_count = 6;</code> 680 * 681 * @return The evaluatedExampleCount. 682 */ 683 @java.lang.Override getEvaluatedExampleCount()684 public int getEvaluatedExampleCount() { 685 return evaluatedExampleCount_; 686 } 687 688 private byte memoizedIsInitialized = -1; 689 690 @java.lang.Override isInitialized()691 public final boolean isInitialized() { 692 byte isInitialized = memoizedIsInitialized; 693 if (isInitialized == 1) return true; 694 if (isInitialized == 0) return false; 695 696 memoizedIsInitialized = 1; 697 return true; 698 } 699 700 @java.lang.Override writeTo(com.google.protobuf.CodedOutputStream output)701 public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { 702 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 703 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); 704 } 705 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(annotationSpecId_)) { 706 com.google.protobuf.GeneratedMessageV3.writeString(output, 2, annotationSpecId_); 707 } 708 if (createTime_ != null) { 709 output.writeMessage(5, getCreateTime()); 710 } 711 if (evaluatedExampleCount_ != 0) { 712 output.writeInt32(6, evaluatedExampleCount_); 713 } 714 if (metricsCase_ == 8) { 715 output.writeMessage(8, (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_); 716 } 717 if (metricsCase_ == 9) { 718 output.writeMessage(9, (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_); 719 } 720 if (metricsCase_ == 11) { 721 output.writeMessage(11, (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_); 722 } 723 if (metricsCase_ == 12) { 724 output.writeMessage( 725 12, (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_); 726 } 727 if (metricsCase_ == 13) { 728 output.writeMessage( 729 13, (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_); 730 } 731 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 732 com.google.protobuf.GeneratedMessageV3.writeString(output, 15, displayName_); 733 } 734 getUnknownFields().writeTo(output); 735 } 736 737 @java.lang.Override getSerializedSize()738 public int getSerializedSize() { 739 int size = memoizedSize; 740 if (size != -1) return size; 741 742 size = 0; 743 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { 744 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); 745 } 746 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(annotationSpecId_)) { 747 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, annotationSpecId_); 748 } 749 if (createTime_ != null) { 750 size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); 751 } 752 if (evaluatedExampleCount_ != 0) { 753 size += com.google.protobuf.CodedOutputStream.computeInt32Size(6, evaluatedExampleCount_); 754 } 755 if (metricsCase_ == 8) { 756 size += 757 com.google.protobuf.CodedOutputStream.computeMessageSize( 758 8, (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_); 759 } 760 if (metricsCase_ == 9) { 761 size += 762 com.google.protobuf.CodedOutputStream.computeMessageSize( 763 9, (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_); 764 } 765 if (metricsCase_ == 11) { 766 size += 767 com.google.protobuf.CodedOutputStream.computeMessageSize( 768 11, (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_); 769 } 770 if (metricsCase_ == 12) { 771 size += 772 com.google.protobuf.CodedOutputStream.computeMessageSize( 773 12, (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_); 774 } 775 if (metricsCase_ == 13) { 776 size += 777 com.google.protobuf.CodedOutputStream.computeMessageSize( 778 13, (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_); 779 } 780 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { 781 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, displayName_); 782 } 783 size += getUnknownFields().getSerializedSize(); 784 memoizedSize = size; 785 return size; 786 } 787 788 @java.lang.Override equals(final java.lang.Object obj)789 public boolean equals(final java.lang.Object obj) { 790 if (obj == this) { 791 return true; 792 } 793 if (!(obj instanceof com.google.cloud.automl.v1.ModelEvaluation)) { 794 return super.equals(obj); 795 } 796 com.google.cloud.automl.v1.ModelEvaluation other = 797 (com.google.cloud.automl.v1.ModelEvaluation) obj; 798 799 if (!getName().equals(other.getName())) return false; 800 if (!getAnnotationSpecId().equals(other.getAnnotationSpecId())) return false; 801 if (!getDisplayName().equals(other.getDisplayName())) return false; 802 if (hasCreateTime() != other.hasCreateTime()) return false; 803 if (hasCreateTime()) { 804 if (!getCreateTime().equals(other.getCreateTime())) return false; 805 } 806 if (getEvaluatedExampleCount() != other.getEvaluatedExampleCount()) return false; 807 if (!getMetricsCase().equals(other.getMetricsCase())) return false; 808 switch (metricsCase_) { 809 case 8: 810 if (!getClassificationEvaluationMetrics() 811 .equals(other.getClassificationEvaluationMetrics())) return false; 812 break; 813 case 9: 814 if (!getTranslationEvaluationMetrics().equals(other.getTranslationEvaluationMetrics())) 815 return false; 816 break; 817 case 12: 818 if (!getImageObjectDetectionEvaluationMetrics() 819 .equals(other.getImageObjectDetectionEvaluationMetrics())) return false; 820 break; 821 case 11: 822 if (!getTextSentimentEvaluationMetrics().equals(other.getTextSentimentEvaluationMetrics())) 823 return false; 824 break; 825 case 13: 826 if (!getTextExtractionEvaluationMetrics() 827 .equals(other.getTextExtractionEvaluationMetrics())) return false; 828 break; 829 case 0: 830 default: 831 } 832 if (!getUnknownFields().equals(other.getUnknownFields())) return false; 833 return true; 834 } 835 836 @java.lang.Override hashCode()837 public int hashCode() { 838 if (memoizedHashCode != 0) { 839 return memoizedHashCode; 840 } 841 int hash = 41; 842 hash = (19 * hash) + getDescriptor().hashCode(); 843 hash = (37 * hash) + NAME_FIELD_NUMBER; 844 hash = (53 * hash) + getName().hashCode(); 845 hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; 846 hash = (53 * hash) + getAnnotationSpecId().hashCode(); 847 hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; 848 hash = (53 * hash) + getDisplayName().hashCode(); 849 if (hasCreateTime()) { 850 hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; 851 hash = (53 * hash) + getCreateTime().hashCode(); 852 } 853 hash = (37 * hash) + EVALUATED_EXAMPLE_COUNT_FIELD_NUMBER; 854 hash = (53 * hash) + getEvaluatedExampleCount(); 855 switch (metricsCase_) { 856 case 8: 857 hash = (37 * hash) + CLASSIFICATION_EVALUATION_METRICS_FIELD_NUMBER; 858 hash = (53 * hash) + getClassificationEvaluationMetrics().hashCode(); 859 break; 860 case 9: 861 hash = (37 * hash) + TRANSLATION_EVALUATION_METRICS_FIELD_NUMBER; 862 hash = (53 * hash) + getTranslationEvaluationMetrics().hashCode(); 863 break; 864 case 12: 865 hash = (37 * hash) + IMAGE_OBJECT_DETECTION_EVALUATION_METRICS_FIELD_NUMBER; 866 hash = (53 * hash) + getImageObjectDetectionEvaluationMetrics().hashCode(); 867 break; 868 case 11: 869 hash = (37 * hash) + TEXT_SENTIMENT_EVALUATION_METRICS_FIELD_NUMBER; 870 hash = (53 * hash) + getTextSentimentEvaluationMetrics().hashCode(); 871 break; 872 case 13: 873 hash = (37 * hash) + TEXT_EXTRACTION_EVALUATION_METRICS_FIELD_NUMBER; 874 hash = (53 * hash) + getTextExtractionEvaluationMetrics().hashCode(); 875 break; 876 case 0: 877 default: 878 } 879 hash = (29 * hash) + getUnknownFields().hashCode(); 880 memoizedHashCode = hash; 881 return hash; 882 } 883 parseFrom(java.nio.ByteBuffer data)884 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom(java.nio.ByteBuffer data) 885 throws com.google.protobuf.InvalidProtocolBufferException { 886 return PARSER.parseFrom(data); 887 } 888 parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)889 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 890 java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 891 throws com.google.protobuf.InvalidProtocolBufferException { 892 return PARSER.parseFrom(data, extensionRegistry); 893 } 894 parseFrom( com.google.protobuf.ByteString data)895 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 896 com.google.protobuf.ByteString data) 897 throws com.google.protobuf.InvalidProtocolBufferException { 898 return PARSER.parseFrom(data); 899 } 900 parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)901 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 902 com.google.protobuf.ByteString data, 903 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 904 throws com.google.protobuf.InvalidProtocolBufferException { 905 return PARSER.parseFrom(data, extensionRegistry); 906 } 907 parseFrom(byte[] data)908 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom(byte[] data) 909 throws com.google.protobuf.InvalidProtocolBufferException { 910 return PARSER.parseFrom(data); 911 } 912 parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)913 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 914 byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 915 throws com.google.protobuf.InvalidProtocolBufferException { 916 return PARSER.parseFrom(data, extensionRegistry); 917 } 918 parseFrom(java.io.InputStream input)919 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom(java.io.InputStream input) 920 throws java.io.IOException { 921 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 922 } 923 parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)924 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 925 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 926 throws java.io.IOException { 927 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 928 PARSER, input, extensionRegistry); 929 } 930 parseDelimitedFrom( java.io.InputStream input)931 public static com.google.cloud.automl.v1.ModelEvaluation parseDelimitedFrom( 932 java.io.InputStream input) throws java.io.IOException { 933 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); 934 } 935 parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)936 public static com.google.cloud.automl.v1.ModelEvaluation parseDelimitedFrom( 937 java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) 938 throws java.io.IOException { 939 return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( 940 PARSER, input, extensionRegistry); 941 } 942 parseFrom( com.google.protobuf.CodedInputStream input)943 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 944 com.google.protobuf.CodedInputStream input) throws java.io.IOException { 945 return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); 946 } 947 parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)948 public static com.google.cloud.automl.v1.ModelEvaluation parseFrom( 949 com.google.protobuf.CodedInputStream input, 950 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 951 throws java.io.IOException { 952 return com.google.protobuf.GeneratedMessageV3.parseWithIOException( 953 PARSER, input, extensionRegistry); 954 } 955 956 @java.lang.Override newBuilderForType()957 public Builder newBuilderForType() { 958 return newBuilder(); 959 } 960 newBuilder()961 public static Builder newBuilder() { 962 return DEFAULT_INSTANCE.toBuilder(); 963 } 964 newBuilder(com.google.cloud.automl.v1.ModelEvaluation prototype)965 public static Builder newBuilder(com.google.cloud.automl.v1.ModelEvaluation prototype) { 966 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); 967 } 968 969 @java.lang.Override toBuilder()970 public Builder toBuilder() { 971 return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); 972 } 973 974 @java.lang.Override newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)975 protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 976 Builder builder = new Builder(parent); 977 return builder; 978 } 979 /** 980 * 981 * 982 * <pre> 983 * Evaluation results of a model. 984 * </pre> 985 * 986 * Protobuf type {@code google.cloud.automl.v1.ModelEvaluation} 987 */ 988 public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> 989 implements 990 // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1.ModelEvaluation) 991 com.google.cloud.automl.v1.ModelEvaluationOrBuilder { getDescriptor()992 public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { 993 return com.google.cloud.automl.v1.ModelEvaluationOuterClass 994 .internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; 995 } 996 997 @java.lang.Override 998 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()999 internalGetFieldAccessorTable() { 1000 return com.google.cloud.automl.v1.ModelEvaluationOuterClass 1001 .internal_static_google_cloud_automl_v1_ModelEvaluation_fieldAccessorTable 1002 .ensureFieldAccessorsInitialized( 1003 com.google.cloud.automl.v1.ModelEvaluation.class, 1004 com.google.cloud.automl.v1.ModelEvaluation.Builder.class); 1005 } 1006 1007 // Construct using com.google.cloud.automl.v1.ModelEvaluation.newBuilder() Builder()1008 private Builder() {} 1009 Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)1010 private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { 1011 super(parent); 1012 } 1013 1014 @java.lang.Override clear()1015 public Builder clear() { 1016 super.clear(); 1017 bitField0_ = 0; 1018 if (classificationEvaluationMetricsBuilder_ != null) { 1019 classificationEvaluationMetricsBuilder_.clear(); 1020 } 1021 if (translationEvaluationMetricsBuilder_ != null) { 1022 translationEvaluationMetricsBuilder_.clear(); 1023 } 1024 if (imageObjectDetectionEvaluationMetricsBuilder_ != null) { 1025 imageObjectDetectionEvaluationMetricsBuilder_.clear(); 1026 } 1027 if (textSentimentEvaluationMetricsBuilder_ != null) { 1028 textSentimentEvaluationMetricsBuilder_.clear(); 1029 } 1030 if (textExtractionEvaluationMetricsBuilder_ != null) { 1031 textExtractionEvaluationMetricsBuilder_.clear(); 1032 } 1033 name_ = ""; 1034 annotationSpecId_ = ""; 1035 displayName_ = ""; 1036 createTime_ = null; 1037 if (createTimeBuilder_ != null) { 1038 createTimeBuilder_.dispose(); 1039 createTimeBuilder_ = null; 1040 } 1041 evaluatedExampleCount_ = 0; 1042 metricsCase_ = 0; 1043 metrics_ = null; 1044 return this; 1045 } 1046 1047 @java.lang.Override getDescriptorForType()1048 public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { 1049 return com.google.cloud.automl.v1.ModelEvaluationOuterClass 1050 .internal_static_google_cloud_automl_v1_ModelEvaluation_descriptor; 1051 } 1052 1053 @java.lang.Override getDefaultInstanceForType()1054 public com.google.cloud.automl.v1.ModelEvaluation getDefaultInstanceForType() { 1055 return com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance(); 1056 } 1057 1058 @java.lang.Override build()1059 public com.google.cloud.automl.v1.ModelEvaluation build() { 1060 com.google.cloud.automl.v1.ModelEvaluation result = buildPartial(); 1061 if (!result.isInitialized()) { 1062 throw newUninitializedMessageException(result); 1063 } 1064 return result; 1065 } 1066 1067 @java.lang.Override buildPartial()1068 public com.google.cloud.automl.v1.ModelEvaluation buildPartial() { 1069 com.google.cloud.automl.v1.ModelEvaluation result = 1070 new com.google.cloud.automl.v1.ModelEvaluation(this); 1071 if (bitField0_ != 0) { 1072 buildPartial0(result); 1073 } 1074 buildPartialOneofs(result); 1075 onBuilt(); 1076 return result; 1077 } 1078 buildPartial0(com.google.cloud.automl.v1.ModelEvaluation result)1079 private void buildPartial0(com.google.cloud.automl.v1.ModelEvaluation result) { 1080 int from_bitField0_ = bitField0_; 1081 if (((from_bitField0_ & 0x00000020) != 0)) { 1082 result.name_ = name_; 1083 } 1084 if (((from_bitField0_ & 0x00000040) != 0)) { 1085 result.annotationSpecId_ = annotationSpecId_; 1086 } 1087 if (((from_bitField0_ & 0x00000080) != 0)) { 1088 result.displayName_ = displayName_; 1089 } 1090 if (((from_bitField0_ & 0x00000100) != 0)) { 1091 result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); 1092 } 1093 if (((from_bitField0_ & 0x00000200) != 0)) { 1094 result.evaluatedExampleCount_ = evaluatedExampleCount_; 1095 } 1096 } 1097 buildPartialOneofs(com.google.cloud.automl.v1.ModelEvaluation result)1098 private void buildPartialOneofs(com.google.cloud.automl.v1.ModelEvaluation result) { 1099 result.metricsCase_ = metricsCase_; 1100 result.metrics_ = this.metrics_; 1101 if (metricsCase_ == 8 && classificationEvaluationMetricsBuilder_ != null) { 1102 result.metrics_ = classificationEvaluationMetricsBuilder_.build(); 1103 } 1104 if (metricsCase_ == 9 && translationEvaluationMetricsBuilder_ != null) { 1105 result.metrics_ = translationEvaluationMetricsBuilder_.build(); 1106 } 1107 if (metricsCase_ == 12 && imageObjectDetectionEvaluationMetricsBuilder_ != null) { 1108 result.metrics_ = imageObjectDetectionEvaluationMetricsBuilder_.build(); 1109 } 1110 if (metricsCase_ == 11 && textSentimentEvaluationMetricsBuilder_ != null) { 1111 result.metrics_ = textSentimentEvaluationMetricsBuilder_.build(); 1112 } 1113 if (metricsCase_ == 13 && textExtractionEvaluationMetricsBuilder_ != null) { 1114 result.metrics_ = textExtractionEvaluationMetricsBuilder_.build(); 1115 } 1116 } 1117 1118 @java.lang.Override clone()1119 public Builder clone() { 1120 return super.clone(); 1121 } 1122 1123 @java.lang.Override setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1124 public Builder setField( 1125 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1126 return super.setField(field, value); 1127 } 1128 1129 @java.lang.Override clearField(com.google.protobuf.Descriptors.FieldDescriptor field)1130 public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { 1131 return super.clearField(field); 1132 } 1133 1134 @java.lang.Override clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)1135 public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { 1136 return super.clearOneof(oneof); 1137 } 1138 1139 @java.lang.Override setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)1140 public Builder setRepeatedField( 1141 com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { 1142 return super.setRepeatedField(field, index, value); 1143 } 1144 1145 @java.lang.Override addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)1146 public Builder addRepeatedField( 1147 com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { 1148 return super.addRepeatedField(field, value); 1149 } 1150 1151 @java.lang.Override mergeFrom(com.google.protobuf.Message other)1152 public Builder mergeFrom(com.google.protobuf.Message other) { 1153 if (other instanceof com.google.cloud.automl.v1.ModelEvaluation) { 1154 return mergeFrom((com.google.cloud.automl.v1.ModelEvaluation) other); 1155 } else { 1156 super.mergeFrom(other); 1157 return this; 1158 } 1159 } 1160 mergeFrom(com.google.cloud.automl.v1.ModelEvaluation other)1161 public Builder mergeFrom(com.google.cloud.automl.v1.ModelEvaluation other) { 1162 if (other == com.google.cloud.automl.v1.ModelEvaluation.getDefaultInstance()) return this; 1163 if (!other.getName().isEmpty()) { 1164 name_ = other.name_; 1165 bitField0_ |= 0x00000020; 1166 onChanged(); 1167 } 1168 if (!other.getAnnotationSpecId().isEmpty()) { 1169 annotationSpecId_ = other.annotationSpecId_; 1170 bitField0_ |= 0x00000040; 1171 onChanged(); 1172 } 1173 if (!other.getDisplayName().isEmpty()) { 1174 displayName_ = other.displayName_; 1175 bitField0_ |= 0x00000080; 1176 onChanged(); 1177 } 1178 if (other.hasCreateTime()) { 1179 mergeCreateTime(other.getCreateTime()); 1180 } 1181 if (other.getEvaluatedExampleCount() != 0) { 1182 setEvaluatedExampleCount(other.getEvaluatedExampleCount()); 1183 } 1184 switch (other.getMetricsCase()) { 1185 case CLASSIFICATION_EVALUATION_METRICS: 1186 { 1187 mergeClassificationEvaluationMetrics(other.getClassificationEvaluationMetrics()); 1188 break; 1189 } 1190 case TRANSLATION_EVALUATION_METRICS: 1191 { 1192 mergeTranslationEvaluationMetrics(other.getTranslationEvaluationMetrics()); 1193 break; 1194 } 1195 case IMAGE_OBJECT_DETECTION_EVALUATION_METRICS: 1196 { 1197 mergeImageObjectDetectionEvaluationMetrics( 1198 other.getImageObjectDetectionEvaluationMetrics()); 1199 break; 1200 } 1201 case TEXT_SENTIMENT_EVALUATION_METRICS: 1202 { 1203 mergeTextSentimentEvaluationMetrics(other.getTextSentimentEvaluationMetrics()); 1204 break; 1205 } 1206 case TEXT_EXTRACTION_EVALUATION_METRICS: 1207 { 1208 mergeTextExtractionEvaluationMetrics(other.getTextExtractionEvaluationMetrics()); 1209 break; 1210 } 1211 case METRICS_NOT_SET: 1212 { 1213 break; 1214 } 1215 } 1216 this.mergeUnknownFields(other.getUnknownFields()); 1217 onChanged(); 1218 return this; 1219 } 1220 1221 @java.lang.Override isInitialized()1222 public final boolean isInitialized() { 1223 return true; 1224 } 1225 1226 @java.lang.Override mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)1227 public Builder mergeFrom( 1228 com.google.protobuf.CodedInputStream input, 1229 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 1230 throws java.io.IOException { 1231 if (extensionRegistry == null) { 1232 throw new java.lang.NullPointerException(); 1233 } 1234 try { 1235 boolean done = false; 1236 while (!done) { 1237 int tag = input.readTag(); 1238 switch (tag) { 1239 case 0: 1240 done = true; 1241 break; 1242 case 10: 1243 { 1244 name_ = input.readStringRequireUtf8(); 1245 bitField0_ |= 0x00000020; 1246 break; 1247 } // case 10 1248 case 18: 1249 { 1250 annotationSpecId_ = input.readStringRequireUtf8(); 1251 bitField0_ |= 0x00000040; 1252 break; 1253 } // case 18 1254 case 42: 1255 { 1256 input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); 1257 bitField0_ |= 0x00000100; 1258 break; 1259 } // case 42 1260 case 48: 1261 { 1262 evaluatedExampleCount_ = input.readInt32(); 1263 bitField0_ |= 0x00000200; 1264 break; 1265 } // case 48 1266 case 66: 1267 { 1268 input.readMessage( 1269 getClassificationEvaluationMetricsFieldBuilder().getBuilder(), 1270 extensionRegistry); 1271 metricsCase_ = 8; 1272 break; 1273 } // case 66 1274 case 74: 1275 { 1276 input.readMessage( 1277 getTranslationEvaluationMetricsFieldBuilder().getBuilder(), extensionRegistry); 1278 metricsCase_ = 9; 1279 break; 1280 } // case 74 1281 case 90: 1282 { 1283 input.readMessage( 1284 getTextSentimentEvaluationMetricsFieldBuilder().getBuilder(), 1285 extensionRegistry); 1286 metricsCase_ = 11; 1287 break; 1288 } // case 90 1289 case 98: 1290 { 1291 input.readMessage( 1292 getImageObjectDetectionEvaluationMetricsFieldBuilder().getBuilder(), 1293 extensionRegistry); 1294 metricsCase_ = 12; 1295 break; 1296 } // case 98 1297 case 106: 1298 { 1299 input.readMessage( 1300 getTextExtractionEvaluationMetricsFieldBuilder().getBuilder(), 1301 extensionRegistry); 1302 metricsCase_ = 13; 1303 break; 1304 } // case 106 1305 case 122: 1306 { 1307 displayName_ = input.readStringRequireUtf8(); 1308 bitField0_ |= 0x00000080; 1309 break; 1310 } // case 122 1311 default: 1312 { 1313 if (!super.parseUnknownField(input, extensionRegistry, tag)) { 1314 done = true; // was an endgroup tag 1315 } 1316 break; 1317 } // default: 1318 } // switch (tag) 1319 } // while (!done) 1320 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 1321 throw e.unwrapIOException(); 1322 } finally { 1323 onChanged(); 1324 } // finally 1325 return this; 1326 } 1327 1328 private int metricsCase_ = 0; 1329 private java.lang.Object metrics_; 1330 getMetricsCase()1331 public MetricsCase getMetricsCase() { 1332 return MetricsCase.forNumber(metricsCase_); 1333 } 1334 clearMetrics()1335 public Builder clearMetrics() { 1336 metricsCase_ = 0; 1337 metrics_ = null; 1338 onChanged(); 1339 return this; 1340 } 1341 1342 private int bitField0_; 1343 1344 private com.google.protobuf.SingleFieldBuilderV3< 1345 com.google.cloud.automl.v1.ClassificationEvaluationMetrics, 1346 com.google.cloud.automl.v1.ClassificationEvaluationMetrics.Builder, 1347 com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder> 1348 classificationEvaluationMetricsBuilder_; 1349 /** 1350 * 1351 * 1352 * <pre> 1353 * Model evaluation metrics for image, text, video and tables 1354 * classification. 1355 * Tables problem is considered a classification when the target column 1356 * is CATEGORY DataType. 1357 * </pre> 1358 * 1359 * <code> 1360 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1361 * </code> 1362 * 1363 * @return Whether the classificationEvaluationMetrics field is set. 1364 */ 1365 @java.lang.Override hasClassificationEvaluationMetrics()1366 public boolean hasClassificationEvaluationMetrics() { 1367 return metricsCase_ == 8; 1368 } 1369 /** 1370 * 1371 * 1372 * <pre> 1373 * Model evaluation metrics for image, text, video and tables 1374 * classification. 1375 * Tables problem is considered a classification when the target column 1376 * is CATEGORY DataType. 1377 * </pre> 1378 * 1379 * <code> 1380 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1381 * </code> 1382 * 1383 * @return The classificationEvaluationMetrics. 1384 */ 1385 @java.lang.Override 1386 public com.google.cloud.automl.v1.ClassificationEvaluationMetrics getClassificationEvaluationMetrics()1387 getClassificationEvaluationMetrics() { 1388 if (classificationEvaluationMetricsBuilder_ == null) { 1389 if (metricsCase_ == 8) { 1390 return (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_; 1391 } 1392 return com.google.cloud.automl.v1.ClassificationEvaluationMetrics.getDefaultInstance(); 1393 } else { 1394 if (metricsCase_ == 8) { 1395 return classificationEvaluationMetricsBuilder_.getMessage(); 1396 } 1397 return com.google.cloud.automl.v1.ClassificationEvaluationMetrics.getDefaultInstance(); 1398 } 1399 } 1400 /** 1401 * 1402 * 1403 * <pre> 1404 * Model evaluation metrics for image, text, video and tables 1405 * classification. 1406 * Tables problem is considered a classification when the target column 1407 * is CATEGORY DataType. 1408 * </pre> 1409 * 1410 * <code> 1411 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1412 * </code> 1413 */ setClassificationEvaluationMetrics( com.google.cloud.automl.v1.ClassificationEvaluationMetrics value)1414 public Builder setClassificationEvaluationMetrics( 1415 com.google.cloud.automl.v1.ClassificationEvaluationMetrics value) { 1416 if (classificationEvaluationMetricsBuilder_ == null) { 1417 if (value == null) { 1418 throw new NullPointerException(); 1419 } 1420 metrics_ = value; 1421 onChanged(); 1422 } else { 1423 classificationEvaluationMetricsBuilder_.setMessage(value); 1424 } 1425 metricsCase_ = 8; 1426 return this; 1427 } 1428 /** 1429 * 1430 * 1431 * <pre> 1432 * Model evaluation metrics for image, text, video and tables 1433 * classification. 1434 * Tables problem is considered a classification when the target column 1435 * is CATEGORY DataType. 1436 * </pre> 1437 * 1438 * <code> 1439 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1440 * </code> 1441 */ setClassificationEvaluationMetrics( com.google.cloud.automl.v1.ClassificationEvaluationMetrics.Builder builderForValue)1442 public Builder setClassificationEvaluationMetrics( 1443 com.google.cloud.automl.v1.ClassificationEvaluationMetrics.Builder builderForValue) { 1444 if (classificationEvaluationMetricsBuilder_ == null) { 1445 metrics_ = builderForValue.build(); 1446 onChanged(); 1447 } else { 1448 classificationEvaluationMetricsBuilder_.setMessage(builderForValue.build()); 1449 } 1450 metricsCase_ = 8; 1451 return this; 1452 } 1453 /** 1454 * 1455 * 1456 * <pre> 1457 * Model evaluation metrics for image, text, video and tables 1458 * classification. 1459 * Tables problem is considered a classification when the target column 1460 * is CATEGORY DataType. 1461 * </pre> 1462 * 1463 * <code> 1464 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1465 * </code> 1466 */ mergeClassificationEvaluationMetrics( com.google.cloud.automl.v1.ClassificationEvaluationMetrics value)1467 public Builder mergeClassificationEvaluationMetrics( 1468 com.google.cloud.automl.v1.ClassificationEvaluationMetrics value) { 1469 if (classificationEvaluationMetricsBuilder_ == null) { 1470 if (metricsCase_ == 8 1471 && metrics_ 1472 != com.google.cloud.automl.v1.ClassificationEvaluationMetrics 1473 .getDefaultInstance()) { 1474 metrics_ = 1475 com.google.cloud.automl.v1.ClassificationEvaluationMetrics.newBuilder( 1476 (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_) 1477 .mergeFrom(value) 1478 .buildPartial(); 1479 } else { 1480 metrics_ = value; 1481 } 1482 onChanged(); 1483 } else { 1484 if (metricsCase_ == 8) { 1485 classificationEvaluationMetricsBuilder_.mergeFrom(value); 1486 } else { 1487 classificationEvaluationMetricsBuilder_.setMessage(value); 1488 } 1489 } 1490 metricsCase_ = 8; 1491 return this; 1492 } 1493 /** 1494 * 1495 * 1496 * <pre> 1497 * Model evaluation metrics for image, text, video and tables 1498 * classification. 1499 * Tables problem is considered a classification when the target column 1500 * is CATEGORY DataType. 1501 * </pre> 1502 * 1503 * <code> 1504 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1505 * </code> 1506 */ clearClassificationEvaluationMetrics()1507 public Builder clearClassificationEvaluationMetrics() { 1508 if (classificationEvaluationMetricsBuilder_ == null) { 1509 if (metricsCase_ == 8) { 1510 metricsCase_ = 0; 1511 metrics_ = null; 1512 onChanged(); 1513 } 1514 } else { 1515 if (metricsCase_ == 8) { 1516 metricsCase_ = 0; 1517 metrics_ = null; 1518 } 1519 classificationEvaluationMetricsBuilder_.clear(); 1520 } 1521 return this; 1522 } 1523 /** 1524 * 1525 * 1526 * <pre> 1527 * Model evaluation metrics for image, text, video and tables 1528 * classification. 1529 * Tables problem is considered a classification when the target column 1530 * is CATEGORY DataType. 1531 * </pre> 1532 * 1533 * <code> 1534 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1535 * </code> 1536 */ 1537 public com.google.cloud.automl.v1.ClassificationEvaluationMetrics.Builder getClassificationEvaluationMetricsBuilder()1538 getClassificationEvaluationMetricsBuilder() { 1539 return getClassificationEvaluationMetricsFieldBuilder().getBuilder(); 1540 } 1541 /** 1542 * 1543 * 1544 * <pre> 1545 * Model evaluation metrics for image, text, video and tables 1546 * classification. 1547 * Tables problem is considered a classification when the target column 1548 * is CATEGORY DataType. 1549 * </pre> 1550 * 1551 * <code> 1552 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1553 * </code> 1554 */ 1555 @java.lang.Override 1556 public com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder getClassificationEvaluationMetricsOrBuilder()1557 getClassificationEvaluationMetricsOrBuilder() { 1558 if ((metricsCase_ == 8) && (classificationEvaluationMetricsBuilder_ != null)) { 1559 return classificationEvaluationMetricsBuilder_.getMessageOrBuilder(); 1560 } else { 1561 if (metricsCase_ == 8) { 1562 return (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_; 1563 } 1564 return com.google.cloud.automl.v1.ClassificationEvaluationMetrics.getDefaultInstance(); 1565 } 1566 } 1567 /** 1568 * 1569 * 1570 * <pre> 1571 * Model evaluation metrics for image, text, video and tables 1572 * classification. 1573 * Tables problem is considered a classification when the target column 1574 * is CATEGORY DataType. 1575 * </pre> 1576 * 1577 * <code> 1578 * .google.cloud.automl.v1.ClassificationEvaluationMetrics classification_evaluation_metrics = 8; 1579 * </code> 1580 */ 1581 private com.google.protobuf.SingleFieldBuilderV3< 1582 com.google.cloud.automl.v1.ClassificationEvaluationMetrics, 1583 com.google.cloud.automl.v1.ClassificationEvaluationMetrics.Builder, 1584 com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder> getClassificationEvaluationMetricsFieldBuilder()1585 getClassificationEvaluationMetricsFieldBuilder() { 1586 if (classificationEvaluationMetricsBuilder_ == null) { 1587 if (!(metricsCase_ == 8)) { 1588 metrics_ = 1589 com.google.cloud.automl.v1.ClassificationEvaluationMetrics.getDefaultInstance(); 1590 } 1591 classificationEvaluationMetricsBuilder_ = 1592 new com.google.protobuf.SingleFieldBuilderV3< 1593 com.google.cloud.automl.v1.ClassificationEvaluationMetrics, 1594 com.google.cloud.automl.v1.ClassificationEvaluationMetrics.Builder, 1595 com.google.cloud.automl.v1.ClassificationEvaluationMetricsOrBuilder>( 1596 (com.google.cloud.automl.v1.ClassificationEvaluationMetrics) metrics_, 1597 getParentForChildren(), 1598 isClean()); 1599 metrics_ = null; 1600 } 1601 metricsCase_ = 8; 1602 onChanged(); 1603 return classificationEvaluationMetricsBuilder_; 1604 } 1605 1606 private com.google.protobuf.SingleFieldBuilderV3< 1607 com.google.cloud.automl.v1.TranslationEvaluationMetrics, 1608 com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder, 1609 com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder> 1610 translationEvaluationMetricsBuilder_; 1611 /** 1612 * 1613 * 1614 * <pre> 1615 * Model evaluation metrics for translation. 1616 * </pre> 1617 * 1618 * <code> 1619 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1620 * </code> 1621 * 1622 * @return Whether the translationEvaluationMetrics field is set. 1623 */ 1624 @java.lang.Override hasTranslationEvaluationMetrics()1625 public boolean hasTranslationEvaluationMetrics() { 1626 return metricsCase_ == 9; 1627 } 1628 /** 1629 * 1630 * 1631 * <pre> 1632 * Model evaluation metrics for translation. 1633 * </pre> 1634 * 1635 * <code> 1636 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1637 * </code> 1638 * 1639 * @return The translationEvaluationMetrics. 1640 */ 1641 @java.lang.Override 1642 public com.google.cloud.automl.v1.TranslationEvaluationMetrics getTranslationEvaluationMetrics()1643 getTranslationEvaluationMetrics() { 1644 if (translationEvaluationMetricsBuilder_ == null) { 1645 if (metricsCase_ == 9) { 1646 return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; 1647 } 1648 return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); 1649 } else { 1650 if (metricsCase_ == 9) { 1651 return translationEvaluationMetricsBuilder_.getMessage(); 1652 } 1653 return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); 1654 } 1655 } 1656 /** 1657 * 1658 * 1659 * <pre> 1660 * Model evaluation metrics for translation. 1661 * </pre> 1662 * 1663 * <code> 1664 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1665 * </code> 1666 */ setTranslationEvaluationMetrics( com.google.cloud.automl.v1.TranslationEvaluationMetrics value)1667 public Builder setTranslationEvaluationMetrics( 1668 com.google.cloud.automl.v1.TranslationEvaluationMetrics value) { 1669 if (translationEvaluationMetricsBuilder_ == null) { 1670 if (value == null) { 1671 throw new NullPointerException(); 1672 } 1673 metrics_ = value; 1674 onChanged(); 1675 } else { 1676 translationEvaluationMetricsBuilder_.setMessage(value); 1677 } 1678 metricsCase_ = 9; 1679 return this; 1680 } 1681 /** 1682 * 1683 * 1684 * <pre> 1685 * Model evaluation metrics for translation. 1686 * </pre> 1687 * 1688 * <code> 1689 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1690 * </code> 1691 */ setTranslationEvaluationMetrics( com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder builderForValue)1692 public Builder setTranslationEvaluationMetrics( 1693 com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder builderForValue) { 1694 if (translationEvaluationMetricsBuilder_ == null) { 1695 metrics_ = builderForValue.build(); 1696 onChanged(); 1697 } else { 1698 translationEvaluationMetricsBuilder_.setMessage(builderForValue.build()); 1699 } 1700 metricsCase_ = 9; 1701 return this; 1702 } 1703 /** 1704 * 1705 * 1706 * <pre> 1707 * Model evaluation metrics for translation. 1708 * </pre> 1709 * 1710 * <code> 1711 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1712 * </code> 1713 */ mergeTranslationEvaluationMetrics( com.google.cloud.automl.v1.TranslationEvaluationMetrics value)1714 public Builder mergeTranslationEvaluationMetrics( 1715 com.google.cloud.automl.v1.TranslationEvaluationMetrics value) { 1716 if (translationEvaluationMetricsBuilder_ == null) { 1717 if (metricsCase_ == 9 1718 && metrics_ 1719 != com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance()) { 1720 metrics_ = 1721 com.google.cloud.automl.v1.TranslationEvaluationMetrics.newBuilder( 1722 (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_) 1723 .mergeFrom(value) 1724 .buildPartial(); 1725 } else { 1726 metrics_ = value; 1727 } 1728 onChanged(); 1729 } else { 1730 if (metricsCase_ == 9) { 1731 translationEvaluationMetricsBuilder_.mergeFrom(value); 1732 } else { 1733 translationEvaluationMetricsBuilder_.setMessage(value); 1734 } 1735 } 1736 metricsCase_ = 9; 1737 return this; 1738 } 1739 /** 1740 * 1741 * 1742 * <pre> 1743 * Model evaluation metrics for translation. 1744 * </pre> 1745 * 1746 * <code> 1747 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1748 * </code> 1749 */ clearTranslationEvaluationMetrics()1750 public Builder clearTranslationEvaluationMetrics() { 1751 if (translationEvaluationMetricsBuilder_ == null) { 1752 if (metricsCase_ == 9) { 1753 metricsCase_ = 0; 1754 metrics_ = null; 1755 onChanged(); 1756 } 1757 } else { 1758 if (metricsCase_ == 9) { 1759 metricsCase_ = 0; 1760 metrics_ = null; 1761 } 1762 translationEvaluationMetricsBuilder_.clear(); 1763 } 1764 return this; 1765 } 1766 /** 1767 * 1768 * 1769 * <pre> 1770 * Model evaluation metrics for translation. 1771 * </pre> 1772 * 1773 * <code> 1774 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1775 * </code> 1776 */ 1777 public com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder getTranslationEvaluationMetricsBuilder()1778 getTranslationEvaluationMetricsBuilder() { 1779 return getTranslationEvaluationMetricsFieldBuilder().getBuilder(); 1780 } 1781 /** 1782 * 1783 * 1784 * <pre> 1785 * Model evaluation metrics for translation. 1786 * </pre> 1787 * 1788 * <code> 1789 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1790 * </code> 1791 */ 1792 @java.lang.Override 1793 public com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder getTranslationEvaluationMetricsOrBuilder()1794 getTranslationEvaluationMetricsOrBuilder() { 1795 if ((metricsCase_ == 9) && (translationEvaluationMetricsBuilder_ != null)) { 1796 return translationEvaluationMetricsBuilder_.getMessageOrBuilder(); 1797 } else { 1798 if (metricsCase_ == 9) { 1799 return (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_; 1800 } 1801 return com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); 1802 } 1803 } 1804 /** 1805 * 1806 * 1807 * <pre> 1808 * Model evaluation metrics for translation. 1809 * </pre> 1810 * 1811 * <code> 1812 * .google.cloud.automl.v1.TranslationEvaluationMetrics translation_evaluation_metrics = 9; 1813 * </code> 1814 */ 1815 private com.google.protobuf.SingleFieldBuilderV3< 1816 com.google.cloud.automl.v1.TranslationEvaluationMetrics, 1817 com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder, 1818 com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder> getTranslationEvaluationMetricsFieldBuilder()1819 getTranslationEvaluationMetricsFieldBuilder() { 1820 if (translationEvaluationMetricsBuilder_ == null) { 1821 if (!(metricsCase_ == 9)) { 1822 metrics_ = com.google.cloud.automl.v1.TranslationEvaluationMetrics.getDefaultInstance(); 1823 } 1824 translationEvaluationMetricsBuilder_ = 1825 new com.google.protobuf.SingleFieldBuilderV3< 1826 com.google.cloud.automl.v1.TranslationEvaluationMetrics, 1827 com.google.cloud.automl.v1.TranslationEvaluationMetrics.Builder, 1828 com.google.cloud.automl.v1.TranslationEvaluationMetricsOrBuilder>( 1829 (com.google.cloud.automl.v1.TranslationEvaluationMetrics) metrics_, 1830 getParentForChildren(), 1831 isClean()); 1832 metrics_ = null; 1833 } 1834 metricsCase_ = 9; 1835 onChanged(); 1836 return translationEvaluationMetricsBuilder_; 1837 } 1838 1839 private com.google.protobuf.SingleFieldBuilderV3< 1840 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics, 1841 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.Builder, 1842 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder> 1843 imageObjectDetectionEvaluationMetricsBuilder_; 1844 /** 1845 * 1846 * 1847 * <pre> 1848 * Model evaluation metrics for image object detection. 1849 * </pre> 1850 * 1851 * <code> 1852 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 1853 * </code> 1854 * 1855 * @return Whether the imageObjectDetectionEvaluationMetrics field is set. 1856 */ 1857 @java.lang.Override hasImageObjectDetectionEvaluationMetrics()1858 public boolean hasImageObjectDetectionEvaluationMetrics() { 1859 return metricsCase_ == 12; 1860 } 1861 /** 1862 * 1863 * 1864 * <pre> 1865 * Model evaluation metrics for image object detection. 1866 * </pre> 1867 * 1868 * <code> 1869 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 1870 * </code> 1871 * 1872 * @return The imageObjectDetectionEvaluationMetrics. 1873 */ 1874 @java.lang.Override 1875 public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics getImageObjectDetectionEvaluationMetrics()1876 getImageObjectDetectionEvaluationMetrics() { 1877 if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { 1878 if (metricsCase_ == 12) { 1879 return (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_; 1880 } 1881 return com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics 1882 .getDefaultInstance(); 1883 } else { 1884 if (metricsCase_ == 12) { 1885 return imageObjectDetectionEvaluationMetricsBuilder_.getMessage(); 1886 } 1887 return com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics 1888 .getDefaultInstance(); 1889 } 1890 } 1891 /** 1892 * 1893 * 1894 * <pre> 1895 * Model evaluation metrics for image object detection. 1896 * </pre> 1897 * 1898 * <code> 1899 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 1900 * </code> 1901 */ setImageObjectDetectionEvaluationMetrics( com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics value)1902 public Builder setImageObjectDetectionEvaluationMetrics( 1903 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics value) { 1904 if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { 1905 if (value == null) { 1906 throw new NullPointerException(); 1907 } 1908 metrics_ = value; 1909 onChanged(); 1910 } else { 1911 imageObjectDetectionEvaluationMetricsBuilder_.setMessage(value); 1912 } 1913 metricsCase_ = 12; 1914 return this; 1915 } 1916 /** 1917 * 1918 * 1919 * <pre> 1920 * Model evaluation metrics for image object detection. 1921 * </pre> 1922 * 1923 * <code> 1924 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 1925 * </code> 1926 */ setImageObjectDetectionEvaluationMetrics( com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.Builder builderForValue)1927 public Builder setImageObjectDetectionEvaluationMetrics( 1928 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.Builder builderForValue) { 1929 if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { 1930 metrics_ = builderForValue.build(); 1931 onChanged(); 1932 } else { 1933 imageObjectDetectionEvaluationMetricsBuilder_.setMessage(builderForValue.build()); 1934 } 1935 metricsCase_ = 12; 1936 return this; 1937 } 1938 /** 1939 * 1940 * 1941 * <pre> 1942 * Model evaluation metrics for image object detection. 1943 * </pre> 1944 * 1945 * <code> 1946 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 1947 * </code> 1948 */ mergeImageObjectDetectionEvaluationMetrics( com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics value)1949 public Builder mergeImageObjectDetectionEvaluationMetrics( 1950 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics value) { 1951 if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { 1952 if (metricsCase_ == 12 1953 && metrics_ 1954 != com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics 1955 .getDefaultInstance()) { 1956 metrics_ = 1957 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.newBuilder( 1958 (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_) 1959 .mergeFrom(value) 1960 .buildPartial(); 1961 } else { 1962 metrics_ = value; 1963 } 1964 onChanged(); 1965 } else { 1966 if (metricsCase_ == 12) { 1967 imageObjectDetectionEvaluationMetricsBuilder_.mergeFrom(value); 1968 } else { 1969 imageObjectDetectionEvaluationMetricsBuilder_.setMessage(value); 1970 } 1971 } 1972 metricsCase_ = 12; 1973 return this; 1974 } 1975 /** 1976 * 1977 * 1978 * <pre> 1979 * Model evaluation metrics for image object detection. 1980 * </pre> 1981 * 1982 * <code> 1983 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 1984 * </code> 1985 */ clearImageObjectDetectionEvaluationMetrics()1986 public Builder clearImageObjectDetectionEvaluationMetrics() { 1987 if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { 1988 if (metricsCase_ == 12) { 1989 metricsCase_ = 0; 1990 metrics_ = null; 1991 onChanged(); 1992 } 1993 } else { 1994 if (metricsCase_ == 12) { 1995 metricsCase_ = 0; 1996 metrics_ = null; 1997 } 1998 imageObjectDetectionEvaluationMetricsBuilder_.clear(); 1999 } 2000 return this; 2001 } 2002 /** 2003 * 2004 * 2005 * <pre> 2006 * Model evaluation metrics for image object detection. 2007 * </pre> 2008 * 2009 * <code> 2010 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 2011 * </code> 2012 */ 2013 public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.Builder getImageObjectDetectionEvaluationMetricsBuilder()2014 getImageObjectDetectionEvaluationMetricsBuilder() { 2015 return getImageObjectDetectionEvaluationMetricsFieldBuilder().getBuilder(); 2016 } 2017 /** 2018 * 2019 * 2020 * <pre> 2021 * Model evaluation metrics for image object detection. 2022 * </pre> 2023 * 2024 * <code> 2025 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 2026 * </code> 2027 */ 2028 @java.lang.Override 2029 public com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder getImageObjectDetectionEvaluationMetricsOrBuilder()2030 getImageObjectDetectionEvaluationMetricsOrBuilder() { 2031 if ((metricsCase_ == 12) && (imageObjectDetectionEvaluationMetricsBuilder_ != null)) { 2032 return imageObjectDetectionEvaluationMetricsBuilder_.getMessageOrBuilder(); 2033 } else { 2034 if (metricsCase_ == 12) { 2035 return (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_; 2036 } 2037 return com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics 2038 .getDefaultInstance(); 2039 } 2040 } 2041 /** 2042 * 2043 * 2044 * <pre> 2045 * Model evaluation metrics for image object detection. 2046 * </pre> 2047 * 2048 * <code> 2049 * .google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics image_object_detection_evaluation_metrics = 12; 2050 * </code> 2051 */ 2052 private com.google.protobuf.SingleFieldBuilderV3< 2053 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics, 2054 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.Builder, 2055 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder> getImageObjectDetectionEvaluationMetricsFieldBuilder()2056 getImageObjectDetectionEvaluationMetricsFieldBuilder() { 2057 if (imageObjectDetectionEvaluationMetricsBuilder_ == null) { 2058 if (!(metricsCase_ == 12)) { 2059 metrics_ = 2060 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.getDefaultInstance(); 2061 } 2062 imageObjectDetectionEvaluationMetricsBuilder_ = 2063 new com.google.protobuf.SingleFieldBuilderV3< 2064 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics, 2065 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics.Builder, 2066 com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetricsOrBuilder>( 2067 (com.google.cloud.automl.v1.ImageObjectDetectionEvaluationMetrics) metrics_, 2068 getParentForChildren(), 2069 isClean()); 2070 metrics_ = null; 2071 } 2072 metricsCase_ = 12; 2073 onChanged(); 2074 return imageObjectDetectionEvaluationMetricsBuilder_; 2075 } 2076 2077 private com.google.protobuf.SingleFieldBuilderV3< 2078 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics, 2079 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.Builder, 2080 com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder> 2081 textSentimentEvaluationMetricsBuilder_; 2082 /** 2083 * 2084 * 2085 * <pre> 2086 * Evaluation metrics for text sentiment models. 2087 * </pre> 2088 * 2089 * <code> 2090 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2091 * </code> 2092 * 2093 * @return Whether the textSentimentEvaluationMetrics field is set. 2094 */ 2095 @java.lang.Override hasTextSentimentEvaluationMetrics()2096 public boolean hasTextSentimentEvaluationMetrics() { 2097 return metricsCase_ == 11; 2098 } 2099 /** 2100 * 2101 * 2102 * <pre> 2103 * Evaluation metrics for text sentiment models. 2104 * </pre> 2105 * 2106 * <code> 2107 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2108 * </code> 2109 * 2110 * @return The textSentimentEvaluationMetrics. 2111 */ 2112 @java.lang.Override 2113 public com.google.cloud.automl.v1.TextSentimentEvaluationMetrics getTextSentimentEvaluationMetrics()2114 getTextSentimentEvaluationMetrics() { 2115 if (textSentimentEvaluationMetricsBuilder_ == null) { 2116 if (metricsCase_ == 11) { 2117 return (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_; 2118 } 2119 return com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance(); 2120 } else { 2121 if (metricsCase_ == 11) { 2122 return textSentimentEvaluationMetricsBuilder_.getMessage(); 2123 } 2124 return com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance(); 2125 } 2126 } 2127 /** 2128 * 2129 * 2130 * <pre> 2131 * Evaluation metrics for text sentiment models. 2132 * </pre> 2133 * 2134 * <code> 2135 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2136 * </code> 2137 */ setTextSentimentEvaluationMetrics( com.google.cloud.automl.v1.TextSentimentEvaluationMetrics value)2138 public Builder setTextSentimentEvaluationMetrics( 2139 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics value) { 2140 if (textSentimentEvaluationMetricsBuilder_ == null) { 2141 if (value == null) { 2142 throw new NullPointerException(); 2143 } 2144 metrics_ = value; 2145 onChanged(); 2146 } else { 2147 textSentimentEvaluationMetricsBuilder_.setMessage(value); 2148 } 2149 metricsCase_ = 11; 2150 return this; 2151 } 2152 /** 2153 * 2154 * 2155 * <pre> 2156 * Evaluation metrics for text sentiment models. 2157 * </pre> 2158 * 2159 * <code> 2160 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2161 * </code> 2162 */ setTextSentimentEvaluationMetrics( com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.Builder builderForValue)2163 public Builder setTextSentimentEvaluationMetrics( 2164 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.Builder builderForValue) { 2165 if (textSentimentEvaluationMetricsBuilder_ == null) { 2166 metrics_ = builderForValue.build(); 2167 onChanged(); 2168 } else { 2169 textSentimentEvaluationMetricsBuilder_.setMessage(builderForValue.build()); 2170 } 2171 metricsCase_ = 11; 2172 return this; 2173 } 2174 /** 2175 * 2176 * 2177 * <pre> 2178 * Evaluation metrics for text sentiment models. 2179 * </pre> 2180 * 2181 * <code> 2182 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2183 * </code> 2184 */ mergeTextSentimentEvaluationMetrics( com.google.cloud.automl.v1.TextSentimentEvaluationMetrics value)2185 public Builder mergeTextSentimentEvaluationMetrics( 2186 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics value) { 2187 if (textSentimentEvaluationMetricsBuilder_ == null) { 2188 if (metricsCase_ == 11 2189 && metrics_ 2190 != com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance()) { 2191 metrics_ = 2192 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.newBuilder( 2193 (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_) 2194 .mergeFrom(value) 2195 .buildPartial(); 2196 } else { 2197 metrics_ = value; 2198 } 2199 onChanged(); 2200 } else { 2201 if (metricsCase_ == 11) { 2202 textSentimentEvaluationMetricsBuilder_.mergeFrom(value); 2203 } else { 2204 textSentimentEvaluationMetricsBuilder_.setMessage(value); 2205 } 2206 } 2207 metricsCase_ = 11; 2208 return this; 2209 } 2210 /** 2211 * 2212 * 2213 * <pre> 2214 * Evaluation metrics for text sentiment models. 2215 * </pre> 2216 * 2217 * <code> 2218 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2219 * </code> 2220 */ clearTextSentimentEvaluationMetrics()2221 public Builder clearTextSentimentEvaluationMetrics() { 2222 if (textSentimentEvaluationMetricsBuilder_ == null) { 2223 if (metricsCase_ == 11) { 2224 metricsCase_ = 0; 2225 metrics_ = null; 2226 onChanged(); 2227 } 2228 } else { 2229 if (metricsCase_ == 11) { 2230 metricsCase_ = 0; 2231 metrics_ = null; 2232 } 2233 textSentimentEvaluationMetricsBuilder_.clear(); 2234 } 2235 return this; 2236 } 2237 /** 2238 * 2239 * 2240 * <pre> 2241 * Evaluation metrics for text sentiment models. 2242 * </pre> 2243 * 2244 * <code> 2245 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2246 * </code> 2247 */ 2248 public com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.Builder getTextSentimentEvaluationMetricsBuilder()2249 getTextSentimentEvaluationMetricsBuilder() { 2250 return getTextSentimentEvaluationMetricsFieldBuilder().getBuilder(); 2251 } 2252 /** 2253 * 2254 * 2255 * <pre> 2256 * Evaluation metrics for text sentiment models. 2257 * </pre> 2258 * 2259 * <code> 2260 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2261 * </code> 2262 */ 2263 @java.lang.Override 2264 public com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder getTextSentimentEvaluationMetricsOrBuilder()2265 getTextSentimentEvaluationMetricsOrBuilder() { 2266 if ((metricsCase_ == 11) && (textSentimentEvaluationMetricsBuilder_ != null)) { 2267 return textSentimentEvaluationMetricsBuilder_.getMessageOrBuilder(); 2268 } else { 2269 if (metricsCase_ == 11) { 2270 return (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_; 2271 } 2272 return com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance(); 2273 } 2274 } 2275 /** 2276 * 2277 * 2278 * <pre> 2279 * Evaluation metrics for text sentiment models. 2280 * </pre> 2281 * 2282 * <code> 2283 * .google.cloud.automl.v1.TextSentimentEvaluationMetrics text_sentiment_evaluation_metrics = 11; 2284 * </code> 2285 */ 2286 private com.google.protobuf.SingleFieldBuilderV3< 2287 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics, 2288 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.Builder, 2289 com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder> getTextSentimentEvaluationMetricsFieldBuilder()2290 getTextSentimentEvaluationMetricsFieldBuilder() { 2291 if (textSentimentEvaluationMetricsBuilder_ == null) { 2292 if (!(metricsCase_ == 11)) { 2293 metrics_ = com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.getDefaultInstance(); 2294 } 2295 textSentimentEvaluationMetricsBuilder_ = 2296 new com.google.protobuf.SingleFieldBuilderV3< 2297 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics, 2298 com.google.cloud.automl.v1.TextSentimentEvaluationMetrics.Builder, 2299 com.google.cloud.automl.v1.TextSentimentEvaluationMetricsOrBuilder>( 2300 (com.google.cloud.automl.v1.TextSentimentEvaluationMetrics) metrics_, 2301 getParentForChildren(), 2302 isClean()); 2303 metrics_ = null; 2304 } 2305 metricsCase_ = 11; 2306 onChanged(); 2307 return textSentimentEvaluationMetricsBuilder_; 2308 } 2309 2310 private com.google.protobuf.SingleFieldBuilderV3< 2311 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics, 2312 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.Builder, 2313 com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder> 2314 textExtractionEvaluationMetricsBuilder_; 2315 /** 2316 * 2317 * 2318 * <pre> 2319 * Evaluation metrics for text extraction models. 2320 * </pre> 2321 * 2322 * <code> 2323 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2324 * </code> 2325 * 2326 * @return Whether the textExtractionEvaluationMetrics field is set. 2327 */ 2328 @java.lang.Override hasTextExtractionEvaluationMetrics()2329 public boolean hasTextExtractionEvaluationMetrics() { 2330 return metricsCase_ == 13; 2331 } 2332 /** 2333 * 2334 * 2335 * <pre> 2336 * Evaluation metrics for text extraction models. 2337 * </pre> 2338 * 2339 * <code> 2340 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2341 * </code> 2342 * 2343 * @return The textExtractionEvaluationMetrics. 2344 */ 2345 @java.lang.Override 2346 public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics getTextExtractionEvaluationMetrics()2347 getTextExtractionEvaluationMetrics() { 2348 if (textExtractionEvaluationMetricsBuilder_ == null) { 2349 if (metricsCase_ == 13) { 2350 return (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_; 2351 } 2352 return com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.getDefaultInstance(); 2353 } else { 2354 if (metricsCase_ == 13) { 2355 return textExtractionEvaluationMetricsBuilder_.getMessage(); 2356 } 2357 return com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.getDefaultInstance(); 2358 } 2359 } 2360 /** 2361 * 2362 * 2363 * <pre> 2364 * Evaluation metrics for text extraction models. 2365 * </pre> 2366 * 2367 * <code> 2368 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2369 * </code> 2370 */ setTextExtractionEvaluationMetrics( com.google.cloud.automl.v1.TextExtractionEvaluationMetrics value)2371 public Builder setTextExtractionEvaluationMetrics( 2372 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics value) { 2373 if (textExtractionEvaluationMetricsBuilder_ == null) { 2374 if (value == null) { 2375 throw new NullPointerException(); 2376 } 2377 metrics_ = value; 2378 onChanged(); 2379 } else { 2380 textExtractionEvaluationMetricsBuilder_.setMessage(value); 2381 } 2382 metricsCase_ = 13; 2383 return this; 2384 } 2385 /** 2386 * 2387 * 2388 * <pre> 2389 * Evaluation metrics for text extraction models. 2390 * </pre> 2391 * 2392 * <code> 2393 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2394 * </code> 2395 */ setTextExtractionEvaluationMetrics( com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.Builder builderForValue)2396 public Builder setTextExtractionEvaluationMetrics( 2397 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.Builder builderForValue) { 2398 if (textExtractionEvaluationMetricsBuilder_ == null) { 2399 metrics_ = builderForValue.build(); 2400 onChanged(); 2401 } else { 2402 textExtractionEvaluationMetricsBuilder_.setMessage(builderForValue.build()); 2403 } 2404 metricsCase_ = 13; 2405 return this; 2406 } 2407 /** 2408 * 2409 * 2410 * <pre> 2411 * Evaluation metrics for text extraction models. 2412 * </pre> 2413 * 2414 * <code> 2415 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2416 * </code> 2417 */ mergeTextExtractionEvaluationMetrics( com.google.cloud.automl.v1.TextExtractionEvaluationMetrics value)2418 public Builder mergeTextExtractionEvaluationMetrics( 2419 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics value) { 2420 if (textExtractionEvaluationMetricsBuilder_ == null) { 2421 if (metricsCase_ == 13 2422 && metrics_ 2423 != com.google.cloud.automl.v1.TextExtractionEvaluationMetrics 2424 .getDefaultInstance()) { 2425 metrics_ = 2426 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.newBuilder( 2427 (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_) 2428 .mergeFrom(value) 2429 .buildPartial(); 2430 } else { 2431 metrics_ = value; 2432 } 2433 onChanged(); 2434 } else { 2435 if (metricsCase_ == 13) { 2436 textExtractionEvaluationMetricsBuilder_.mergeFrom(value); 2437 } else { 2438 textExtractionEvaluationMetricsBuilder_.setMessage(value); 2439 } 2440 } 2441 metricsCase_ = 13; 2442 return this; 2443 } 2444 /** 2445 * 2446 * 2447 * <pre> 2448 * Evaluation metrics for text extraction models. 2449 * </pre> 2450 * 2451 * <code> 2452 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2453 * </code> 2454 */ clearTextExtractionEvaluationMetrics()2455 public Builder clearTextExtractionEvaluationMetrics() { 2456 if (textExtractionEvaluationMetricsBuilder_ == null) { 2457 if (metricsCase_ == 13) { 2458 metricsCase_ = 0; 2459 metrics_ = null; 2460 onChanged(); 2461 } 2462 } else { 2463 if (metricsCase_ == 13) { 2464 metricsCase_ = 0; 2465 metrics_ = null; 2466 } 2467 textExtractionEvaluationMetricsBuilder_.clear(); 2468 } 2469 return this; 2470 } 2471 /** 2472 * 2473 * 2474 * <pre> 2475 * Evaluation metrics for text extraction models. 2476 * </pre> 2477 * 2478 * <code> 2479 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2480 * </code> 2481 */ 2482 public com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.Builder getTextExtractionEvaluationMetricsBuilder()2483 getTextExtractionEvaluationMetricsBuilder() { 2484 return getTextExtractionEvaluationMetricsFieldBuilder().getBuilder(); 2485 } 2486 /** 2487 * 2488 * 2489 * <pre> 2490 * Evaluation metrics for text extraction models. 2491 * </pre> 2492 * 2493 * <code> 2494 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2495 * </code> 2496 */ 2497 @java.lang.Override 2498 public com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder getTextExtractionEvaluationMetricsOrBuilder()2499 getTextExtractionEvaluationMetricsOrBuilder() { 2500 if ((metricsCase_ == 13) && (textExtractionEvaluationMetricsBuilder_ != null)) { 2501 return textExtractionEvaluationMetricsBuilder_.getMessageOrBuilder(); 2502 } else { 2503 if (metricsCase_ == 13) { 2504 return (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_; 2505 } 2506 return com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.getDefaultInstance(); 2507 } 2508 } 2509 /** 2510 * 2511 * 2512 * <pre> 2513 * Evaluation metrics for text extraction models. 2514 * </pre> 2515 * 2516 * <code> 2517 * .google.cloud.automl.v1.TextExtractionEvaluationMetrics text_extraction_evaluation_metrics = 13; 2518 * </code> 2519 */ 2520 private com.google.protobuf.SingleFieldBuilderV3< 2521 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics, 2522 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.Builder, 2523 com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder> getTextExtractionEvaluationMetricsFieldBuilder()2524 getTextExtractionEvaluationMetricsFieldBuilder() { 2525 if (textExtractionEvaluationMetricsBuilder_ == null) { 2526 if (!(metricsCase_ == 13)) { 2527 metrics_ = 2528 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.getDefaultInstance(); 2529 } 2530 textExtractionEvaluationMetricsBuilder_ = 2531 new com.google.protobuf.SingleFieldBuilderV3< 2532 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics, 2533 com.google.cloud.automl.v1.TextExtractionEvaluationMetrics.Builder, 2534 com.google.cloud.automl.v1.TextExtractionEvaluationMetricsOrBuilder>( 2535 (com.google.cloud.automl.v1.TextExtractionEvaluationMetrics) metrics_, 2536 getParentForChildren(), 2537 isClean()); 2538 metrics_ = null; 2539 } 2540 metricsCase_ = 13; 2541 onChanged(); 2542 return textExtractionEvaluationMetricsBuilder_; 2543 } 2544 2545 private java.lang.Object name_ = ""; 2546 /** 2547 * 2548 * 2549 * <pre> 2550 * Output only. Resource name of the model evaluation. 2551 * Format: 2552 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 2553 * </pre> 2554 * 2555 * <code>string name = 1;</code> 2556 * 2557 * @return The name. 2558 */ getName()2559 public java.lang.String getName() { 2560 java.lang.Object ref = name_; 2561 if (!(ref instanceof java.lang.String)) { 2562 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2563 java.lang.String s = bs.toStringUtf8(); 2564 name_ = s; 2565 return s; 2566 } else { 2567 return (java.lang.String) ref; 2568 } 2569 } 2570 /** 2571 * 2572 * 2573 * <pre> 2574 * Output only. Resource name of the model evaluation. 2575 * Format: 2576 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 2577 * </pre> 2578 * 2579 * <code>string name = 1;</code> 2580 * 2581 * @return The bytes for name. 2582 */ getNameBytes()2583 public com.google.protobuf.ByteString getNameBytes() { 2584 java.lang.Object ref = name_; 2585 if (ref instanceof String) { 2586 com.google.protobuf.ByteString b = 2587 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2588 name_ = b; 2589 return b; 2590 } else { 2591 return (com.google.protobuf.ByteString) ref; 2592 } 2593 } 2594 /** 2595 * 2596 * 2597 * <pre> 2598 * Output only. Resource name of the model evaluation. 2599 * Format: 2600 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 2601 * </pre> 2602 * 2603 * <code>string name = 1;</code> 2604 * 2605 * @param value The name to set. 2606 * @return This builder for chaining. 2607 */ setName(java.lang.String value)2608 public Builder setName(java.lang.String value) { 2609 if (value == null) { 2610 throw new NullPointerException(); 2611 } 2612 name_ = value; 2613 bitField0_ |= 0x00000020; 2614 onChanged(); 2615 return this; 2616 } 2617 /** 2618 * 2619 * 2620 * <pre> 2621 * Output only. Resource name of the model evaluation. 2622 * Format: 2623 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 2624 * </pre> 2625 * 2626 * <code>string name = 1;</code> 2627 * 2628 * @return This builder for chaining. 2629 */ clearName()2630 public Builder clearName() { 2631 name_ = getDefaultInstance().getName(); 2632 bitField0_ = (bitField0_ & ~0x00000020); 2633 onChanged(); 2634 return this; 2635 } 2636 /** 2637 * 2638 * 2639 * <pre> 2640 * Output only. Resource name of the model evaluation. 2641 * Format: 2642 * `projects/{project_id}/locations/{location_id}/models/{model_id}/modelEvaluations/{model_evaluation_id}` 2643 * </pre> 2644 * 2645 * <code>string name = 1;</code> 2646 * 2647 * @param value The bytes for name to set. 2648 * @return This builder for chaining. 2649 */ setNameBytes(com.google.protobuf.ByteString value)2650 public Builder setNameBytes(com.google.protobuf.ByteString value) { 2651 if (value == null) { 2652 throw new NullPointerException(); 2653 } 2654 checkByteStringIsUtf8(value); 2655 name_ = value; 2656 bitField0_ |= 0x00000020; 2657 onChanged(); 2658 return this; 2659 } 2660 2661 private java.lang.Object annotationSpecId_ = ""; 2662 /** 2663 * 2664 * 2665 * <pre> 2666 * Output only. The ID of the annotation spec that the model evaluation applies to. The 2667 * The ID is empty for the overall model evaluation. 2668 * For Tables annotation specs in the dataset do not exist and this ID is 2669 * always not set, but for CLASSIFICATION 2670 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2671 * the 2672 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 2673 * field is used. 2674 * </pre> 2675 * 2676 * <code>string annotation_spec_id = 2;</code> 2677 * 2678 * @return The annotationSpecId. 2679 */ getAnnotationSpecId()2680 public java.lang.String getAnnotationSpecId() { 2681 java.lang.Object ref = annotationSpecId_; 2682 if (!(ref instanceof java.lang.String)) { 2683 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2684 java.lang.String s = bs.toStringUtf8(); 2685 annotationSpecId_ = s; 2686 return s; 2687 } else { 2688 return (java.lang.String) ref; 2689 } 2690 } 2691 /** 2692 * 2693 * 2694 * <pre> 2695 * Output only. The ID of the annotation spec that the model evaluation applies to. The 2696 * The ID is empty for the overall model evaluation. 2697 * For Tables annotation specs in the dataset do not exist and this ID is 2698 * always not set, but for CLASSIFICATION 2699 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2700 * the 2701 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 2702 * field is used. 2703 * </pre> 2704 * 2705 * <code>string annotation_spec_id = 2;</code> 2706 * 2707 * @return The bytes for annotationSpecId. 2708 */ getAnnotationSpecIdBytes()2709 public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { 2710 java.lang.Object ref = annotationSpecId_; 2711 if (ref instanceof String) { 2712 com.google.protobuf.ByteString b = 2713 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2714 annotationSpecId_ = b; 2715 return b; 2716 } else { 2717 return (com.google.protobuf.ByteString) ref; 2718 } 2719 } 2720 /** 2721 * 2722 * 2723 * <pre> 2724 * Output only. The ID of the annotation spec that the model evaluation applies to. The 2725 * The ID is empty for the overall model evaluation. 2726 * For Tables annotation specs in the dataset do not exist and this ID is 2727 * always not set, but for CLASSIFICATION 2728 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2729 * the 2730 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 2731 * field is used. 2732 * </pre> 2733 * 2734 * <code>string annotation_spec_id = 2;</code> 2735 * 2736 * @param value The annotationSpecId to set. 2737 * @return This builder for chaining. 2738 */ setAnnotationSpecId(java.lang.String value)2739 public Builder setAnnotationSpecId(java.lang.String value) { 2740 if (value == null) { 2741 throw new NullPointerException(); 2742 } 2743 annotationSpecId_ = value; 2744 bitField0_ |= 0x00000040; 2745 onChanged(); 2746 return this; 2747 } 2748 /** 2749 * 2750 * 2751 * <pre> 2752 * Output only. The ID of the annotation spec that the model evaluation applies to. The 2753 * The ID is empty for the overall model evaluation. 2754 * For Tables annotation specs in the dataset do not exist and this ID is 2755 * always not set, but for CLASSIFICATION 2756 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2757 * the 2758 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 2759 * field is used. 2760 * </pre> 2761 * 2762 * <code>string annotation_spec_id = 2;</code> 2763 * 2764 * @return This builder for chaining. 2765 */ clearAnnotationSpecId()2766 public Builder clearAnnotationSpecId() { 2767 annotationSpecId_ = getDefaultInstance().getAnnotationSpecId(); 2768 bitField0_ = (bitField0_ & ~0x00000040); 2769 onChanged(); 2770 return this; 2771 } 2772 /** 2773 * 2774 * 2775 * <pre> 2776 * Output only. The ID of the annotation spec that the model evaluation applies to. The 2777 * The ID is empty for the overall model evaluation. 2778 * For Tables annotation specs in the dataset do not exist and this ID is 2779 * always not set, but for CLASSIFICATION 2780 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2781 * the 2782 * [display_name][google.cloud.automl.v1.ModelEvaluation.display_name] 2783 * field is used. 2784 * </pre> 2785 * 2786 * <code>string annotation_spec_id = 2;</code> 2787 * 2788 * @param value The bytes for annotationSpecId to set. 2789 * @return This builder for chaining. 2790 */ setAnnotationSpecIdBytes(com.google.protobuf.ByteString value)2791 public Builder setAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { 2792 if (value == null) { 2793 throw new NullPointerException(); 2794 } 2795 checkByteStringIsUtf8(value); 2796 annotationSpecId_ = value; 2797 bitField0_ |= 0x00000040; 2798 onChanged(); 2799 return this; 2800 } 2801 2802 private java.lang.Object displayName_ = ""; 2803 /** 2804 * 2805 * 2806 * <pre> 2807 * Output only. The value of 2808 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 2809 * at the moment when the model was trained. Because this field returns a 2810 * value at model training time, for different models trained from the same 2811 * dataset, the values may differ, since display names could had been changed 2812 * between the two model's trainings. For Tables CLASSIFICATION 2813 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2814 * distinct values of the target column at the moment of the model evaluation 2815 * are populated here. 2816 * The display_name is empty for the overall model evaluation. 2817 * </pre> 2818 * 2819 * <code>string display_name = 15;</code> 2820 * 2821 * @return The displayName. 2822 */ getDisplayName()2823 public java.lang.String getDisplayName() { 2824 java.lang.Object ref = displayName_; 2825 if (!(ref instanceof java.lang.String)) { 2826 com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; 2827 java.lang.String s = bs.toStringUtf8(); 2828 displayName_ = s; 2829 return s; 2830 } else { 2831 return (java.lang.String) ref; 2832 } 2833 } 2834 /** 2835 * 2836 * 2837 * <pre> 2838 * Output only. The value of 2839 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 2840 * at the moment when the model was trained. Because this field returns a 2841 * value at model training time, for different models trained from the same 2842 * dataset, the values may differ, since display names could had been changed 2843 * between the two model's trainings. For Tables CLASSIFICATION 2844 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2845 * distinct values of the target column at the moment of the model evaluation 2846 * are populated here. 2847 * The display_name is empty for the overall model evaluation. 2848 * </pre> 2849 * 2850 * <code>string display_name = 15;</code> 2851 * 2852 * @return The bytes for displayName. 2853 */ getDisplayNameBytes()2854 public com.google.protobuf.ByteString getDisplayNameBytes() { 2855 java.lang.Object ref = displayName_; 2856 if (ref instanceof String) { 2857 com.google.protobuf.ByteString b = 2858 com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); 2859 displayName_ = b; 2860 return b; 2861 } else { 2862 return (com.google.protobuf.ByteString) ref; 2863 } 2864 } 2865 /** 2866 * 2867 * 2868 * <pre> 2869 * Output only. The value of 2870 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 2871 * at the moment when the model was trained. Because this field returns a 2872 * value at model training time, for different models trained from the same 2873 * dataset, the values may differ, since display names could had been changed 2874 * between the two model's trainings. For Tables CLASSIFICATION 2875 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2876 * distinct values of the target column at the moment of the model evaluation 2877 * are populated here. 2878 * The display_name is empty for the overall model evaluation. 2879 * </pre> 2880 * 2881 * <code>string display_name = 15;</code> 2882 * 2883 * @param value The displayName to set. 2884 * @return This builder for chaining. 2885 */ setDisplayName(java.lang.String value)2886 public Builder setDisplayName(java.lang.String value) { 2887 if (value == null) { 2888 throw new NullPointerException(); 2889 } 2890 displayName_ = value; 2891 bitField0_ |= 0x00000080; 2892 onChanged(); 2893 return this; 2894 } 2895 /** 2896 * 2897 * 2898 * <pre> 2899 * Output only. The value of 2900 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 2901 * at the moment when the model was trained. Because this field returns a 2902 * value at model training time, for different models trained from the same 2903 * dataset, the values may differ, since display names could had been changed 2904 * between the two model's trainings. For Tables CLASSIFICATION 2905 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2906 * distinct values of the target column at the moment of the model evaluation 2907 * are populated here. 2908 * The display_name is empty for the overall model evaluation. 2909 * </pre> 2910 * 2911 * <code>string display_name = 15;</code> 2912 * 2913 * @return This builder for chaining. 2914 */ clearDisplayName()2915 public Builder clearDisplayName() { 2916 displayName_ = getDefaultInstance().getDisplayName(); 2917 bitField0_ = (bitField0_ & ~0x00000080); 2918 onChanged(); 2919 return this; 2920 } 2921 /** 2922 * 2923 * 2924 * <pre> 2925 * Output only. The value of 2926 * [display_name][google.cloud.automl.v1.AnnotationSpec.display_name] 2927 * at the moment when the model was trained. Because this field returns a 2928 * value at model training time, for different models trained from the same 2929 * dataset, the values may differ, since display names could had been changed 2930 * between the two model's trainings. For Tables CLASSIFICATION 2931 * [prediction_type-s][google.cloud.automl.v1.TablesModelMetadata.prediction_type] 2932 * distinct values of the target column at the moment of the model evaluation 2933 * are populated here. 2934 * The display_name is empty for the overall model evaluation. 2935 * </pre> 2936 * 2937 * <code>string display_name = 15;</code> 2938 * 2939 * @param value The bytes for displayName to set. 2940 * @return This builder for chaining. 2941 */ setDisplayNameBytes(com.google.protobuf.ByteString value)2942 public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { 2943 if (value == null) { 2944 throw new NullPointerException(); 2945 } 2946 checkByteStringIsUtf8(value); 2947 displayName_ = value; 2948 bitField0_ |= 0x00000080; 2949 onChanged(); 2950 return this; 2951 } 2952 2953 private com.google.protobuf.Timestamp createTime_; 2954 private com.google.protobuf.SingleFieldBuilderV3< 2955 com.google.protobuf.Timestamp, 2956 com.google.protobuf.Timestamp.Builder, 2957 com.google.protobuf.TimestampOrBuilder> 2958 createTimeBuilder_; 2959 /** 2960 * 2961 * 2962 * <pre> 2963 * Output only. Timestamp when this model evaluation was created. 2964 * </pre> 2965 * 2966 * <code>.google.protobuf.Timestamp create_time = 5;</code> 2967 * 2968 * @return Whether the createTime field is set. 2969 */ hasCreateTime()2970 public boolean hasCreateTime() { 2971 return ((bitField0_ & 0x00000100) != 0); 2972 } 2973 /** 2974 * 2975 * 2976 * <pre> 2977 * Output only. Timestamp when this model evaluation was created. 2978 * </pre> 2979 * 2980 * <code>.google.protobuf.Timestamp create_time = 5;</code> 2981 * 2982 * @return The createTime. 2983 */ getCreateTime()2984 public com.google.protobuf.Timestamp getCreateTime() { 2985 if (createTimeBuilder_ == null) { 2986 return createTime_ == null 2987 ? com.google.protobuf.Timestamp.getDefaultInstance() 2988 : createTime_; 2989 } else { 2990 return createTimeBuilder_.getMessage(); 2991 } 2992 } 2993 /** 2994 * 2995 * 2996 * <pre> 2997 * Output only. Timestamp when this model evaluation was created. 2998 * </pre> 2999 * 3000 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3001 */ setCreateTime(com.google.protobuf.Timestamp value)3002 public Builder setCreateTime(com.google.protobuf.Timestamp value) { 3003 if (createTimeBuilder_ == null) { 3004 if (value == null) { 3005 throw new NullPointerException(); 3006 } 3007 createTime_ = value; 3008 } else { 3009 createTimeBuilder_.setMessage(value); 3010 } 3011 bitField0_ |= 0x00000100; 3012 onChanged(); 3013 return this; 3014 } 3015 /** 3016 * 3017 * 3018 * <pre> 3019 * Output only. Timestamp when this model evaluation was created. 3020 * </pre> 3021 * 3022 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3023 */ setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)3024 public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { 3025 if (createTimeBuilder_ == null) { 3026 createTime_ = builderForValue.build(); 3027 } else { 3028 createTimeBuilder_.setMessage(builderForValue.build()); 3029 } 3030 bitField0_ |= 0x00000100; 3031 onChanged(); 3032 return this; 3033 } 3034 /** 3035 * 3036 * 3037 * <pre> 3038 * Output only. Timestamp when this model evaluation was created. 3039 * </pre> 3040 * 3041 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3042 */ mergeCreateTime(com.google.protobuf.Timestamp value)3043 public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { 3044 if (createTimeBuilder_ == null) { 3045 if (((bitField0_ & 0x00000100) != 0) 3046 && createTime_ != null 3047 && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { 3048 getCreateTimeBuilder().mergeFrom(value); 3049 } else { 3050 createTime_ = value; 3051 } 3052 } else { 3053 createTimeBuilder_.mergeFrom(value); 3054 } 3055 bitField0_ |= 0x00000100; 3056 onChanged(); 3057 return this; 3058 } 3059 /** 3060 * 3061 * 3062 * <pre> 3063 * Output only. Timestamp when this model evaluation was created. 3064 * </pre> 3065 * 3066 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3067 */ clearCreateTime()3068 public Builder clearCreateTime() { 3069 bitField0_ = (bitField0_ & ~0x00000100); 3070 createTime_ = null; 3071 if (createTimeBuilder_ != null) { 3072 createTimeBuilder_.dispose(); 3073 createTimeBuilder_ = null; 3074 } 3075 onChanged(); 3076 return this; 3077 } 3078 /** 3079 * 3080 * 3081 * <pre> 3082 * Output only. Timestamp when this model evaluation was created. 3083 * </pre> 3084 * 3085 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3086 */ getCreateTimeBuilder()3087 public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { 3088 bitField0_ |= 0x00000100; 3089 onChanged(); 3090 return getCreateTimeFieldBuilder().getBuilder(); 3091 } 3092 /** 3093 * 3094 * 3095 * <pre> 3096 * Output only. Timestamp when this model evaluation was created. 3097 * </pre> 3098 * 3099 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3100 */ getCreateTimeOrBuilder()3101 public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { 3102 if (createTimeBuilder_ != null) { 3103 return createTimeBuilder_.getMessageOrBuilder(); 3104 } else { 3105 return createTime_ == null 3106 ? com.google.protobuf.Timestamp.getDefaultInstance() 3107 : createTime_; 3108 } 3109 } 3110 /** 3111 * 3112 * 3113 * <pre> 3114 * Output only. Timestamp when this model evaluation was created. 3115 * </pre> 3116 * 3117 * <code>.google.protobuf.Timestamp create_time = 5;</code> 3118 */ 3119 private com.google.protobuf.SingleFieldBuilderV3< 3120 com.google.protobuf.Timestamp, 3121 com.google.protobuf.Timestamp.Builder, 3122 com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder()3123 getCreateTimeFieldBuilder() { 3124 if (createTimeBuilder_ == null) { 3125 createTimeBuilder_ = 3126 new com.google.protobuf.SingleFieldBuilderV3< 3127 com.google.protobuf.Timestamp, 3128 com.google.protobuf.Timestamp.Builder, 3129 com.google.protobuf.TimestampOrBuilder>( 3130 getCreateTime(), getParentForChildren(), isClean()); 3131 createTime_ = null; 3132 } 3133 return createTimeBuilder_; 3134 } 3135 3136 private int evaluatedExampleCount_; 3137 /** 3138 * 3139 * 3140 * <pre> 3141 * Output only. The number of examples used for model evaluation, i.e. for 3142 * which ground truth from time of model creation is compared against the 3143 * predicted annotations created by the model. 3144 * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is 3145 * the total number of all examples used for evaluation. 3146 * Otherwise, this is the count of examples that according to the ground 3147 * truth were annotated by the 3148 * [annotation_spec_id][google.cloud.automl.v1.ModelEvaluation.annotation_spec_id]. 3149 * </pre> 3150 * 3151 * <code>int32 evaluated_example_count = 6;</code> 3152 * 3153 * @return The evaluatedExampleCount. 3154 */ 3155 @java.lang.Override getEvaluatedExampleCount()3156 public int getEvaluatedExampleCount() { 3157 return evaluatedExampleCount_; 3158 } 3159 /** 3160 * 3161 * 3162 * <pre> 3163 * Output only. The number of examples used for model evaluation, i.e. for 3164 * which ground truth from time of model creation is compared against the 3165 * predicted annotations created by the model. 3166 * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is 3167 * the total number of all examples used for evaluation. 3168 * Otherwise, this is the count of examples that according to the ground 3169 * truth were annotated by the 3170 * [annotation_spec_id][google.cloud.automl.v1.ModelEvaluation.annotation_spec_id]. 3171 * </pre> 3172 * 3173 * <code>int32 evaluated_example_count = 6;</code> 3174 * 3175 * @param value The evaluatedExampleCount to set. 3176 * @return This builder for chaining. 3177 */ setEvaluatedExampleCount(int value)3178 public Builder setEvaluatedExampleCount(int value) { 3179 3180 evaluatedExampleCount_ = value; 3181 bitField0_ |= 0x00000200; 3182 onChanged(); 3183 return this; 3184 } 3185 /** 3186 * 3187 * 3188 * <pre> 3189 * Output only. The number of examples used for model evaluation, i.e. for 3190 * which ground truth from time of model creation is compared against the 3191 * predicted annotations created by the model. 3192 * For overall ModelEvaluation (i.e. with annotation_spec_id not set) this is 3193 * the total number of all examples used for evaluation. 3194 * Otherwise, this is the count of examples that according to the ground 3195 * truth were annotated by the 3196 * [annotation_spec_id][google.cloud.automl.v1.ModelEvaluation.annotation_spec_id]. 3197 * </pre> 3198 * 3199 * <code>int32 evaluated_example_count = 6;</code> 3200 * 3201 * @return This builder for chaining. 3202 */ clearEvaluatedExampleCount()3203 public Builder clearEvaluatedExampleCount() { 3204 bitField0_ = (bitField0_ & ~0x00000200); 3205 evaluatedExampleCount_ = 0; 3206 onChanged(); 3207 return this; 3208 } 3209 3210 @java.lang.Override setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)3211 public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { 3212 return super.setUnknownFields(unknownFields); 3213 } 3214 3215 @java.lang.Override mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields)3216 public final Builder mergeUnknownFields( 3217 final com.google.protobuf.UnknownFieldSet unknownFields) { 3218 return super.mergeUnknownFields(unknownFields); 3219 } 3220 3221 // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1.ModelEvaluation) 3222 } 3223 3224 // @@protoc_insertion_point(class_scope:google.cloud.automl.v1.ModelEvaluation) 3225 private static final com.google.cloud.automl.v1.ModelEvaluation DEFAULT_INSTANCE; 3226 3227 static { 3228 DEFAULT_INSTANCE = new com.google.cloud.automl.v1.ModelEvaluation(); 3229 } 3230 getDefaultInstance()3231 public static com.google.cloud.automl.v1.ModelEvaluation getDefaultInstance() { 3232 return DEFAULT_INSTANCE; 3233 } 3234 3235 private static final com.google.protobuf.Parser<ModelEvaluation> PARSER = 3236 new com.google.protobuf.AbstractParser<ModelEvaluation>() { 3237 @java.lang.Override 3238 public ModelEvaluation parsePartialFrom( 3239 com.google.protobuf.CodedInputStream input, 3240 com.google.protobuf.ExtensionRegistryLite extensionRegistry) 3241 throws com.google.protobuf.InvalidProtocolBufferException { 3242 Builder builder = newBuilder(); 3243 try { 3244 builder.mergeFrom(input, extensionRegistry); 3245 } catch (com.google.protobuf.InvalidProtocolBufferException e) { 3246 throw e.setUnfinishedMessage(builder.buildPartial()); 3247 } catch (com.google.protobuf.UninitializedMessageException e) { 3248 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); 3249 } catch (java.io.IOException e) { 3250 throw new com.google.protobuf.InvalidProtocolBufferException(e) 3251 .setUnfinishedMessage(builder.buildPartial()); 3252 } 3253 return builder.buildPartial(); 3254 } 3255 }; 3256 parser()3257 public static com.google.protobuf.Parser<ModelEvaluation> parser() { 3258 return PARSER; 3259 } 3260 3261 @java.lang.Override getParserForType()3262 public com.google.protobuf.Parser<ModelEvaluation> getParserForType() { 3263 return PARSER; 3264 } 3265 3266 @java.lang.Override getDefaultInstanceForType()3267 public com.google.cloud.automl.v1.ModelEvaluation getDefaultInstanceForType() { 3268 return DEFAULT_INSTANCE; 3269 } 3270 } 3271