public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { Name = input.ReadString(); break; } case 18: { AnnotationSpecId = input.ReadString(); break; } case 42: { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } input.ReadMessage(CreateTime); break; } case 48: { EvaluatedExampleCount = input.ReadInt32(); break; } case 66: { global::Google.Cloud.AutoML.V1.ClassificationEvaluationMetrics subBuilder = new global::Google.Cloud.AutoML.V1.ClassificationEvaluationMetrics(); if (metricsCase_ == MetricsOneofCase.ClassificationEvaluationMetrics) { subBuilder.MergeFrom(ClassificationEvaluationMetrics); } input.ReadMessage(subBuilder); ClassificationEvaluationMetrics = subBuilder; break; } case 74: { global::Google.Cloud.AutoML.V1.TranslationEvaluationMetrics subBuilder = new global::Google.Cloud.AutoML.V1.TranslationEvaluationMetrics(); if (metricsCase_ == MetricsOneofCase.TranslationEvaluationMetrics) { subBuilder.MergeFrom(TranslationEvaluationMetrics); } input.ReadMessage(subBuilder); TranslationEvaluationMetrics = subBuilder; break; } case 90: { global::Google.Cloud.AutoML.V1.TextSentimentEvaluationMetrics subBuilder = new global::Google.Cloud.AutoML.V1.TextSentimentEvaluationMetrics(); if (metricsCase_ == MetricsOneofCase.TextSentimentEvaluationMetrics) { subBuilder.MergeFrom(TextSentimentEvaluationMetrics); } input.ReadMessage(subBuilder); TextSentimentEvaluationMetrics = subBuilder; break; } case 98: { global::Google.Cloud.AutoML.V1.ImageObjectDetectionEvaluationMetrics subBuilder = new global::Google.Cloud.AutoML.V1.ImageObjectDetectionEvaluationMetrics(); if (metricsCase_ == MetricsOneofCase.ImageObjectDetectionEvaluationMetrics) { subBuilder.MergeFrom(ImageObjectDetectionEvaluationMetrics); } input.ReadMessage(subBuilder); ImageObjectDetectionEvaluationMetrics = subBuilder; break; } case 106: { global::Google.Cloud.AutoML.V1.TextExtractionEvaluationMetrics subBuilder = new global::Google.Cloud.AutoML.V1.TextExtractionEvaluationMetrics(); if (metricsCase_ == MetricsOneofCase.TextExtractionEvaluationMetrics) { subBuilder.MergeFrom(TextExtractionEvaluationMetrics); } input.ReadMessage(subBuilder); TextExtractionEvaluationMetrics = subBuilder; break; } case 122: { DisplayName = input.ReadString(); break; } } } }
public void MergeFrom(ModelEvaluation other) { if (other == null) { return; } if (other.Name.Length != 0) { Name = other.Name; } if (other.AnnotationSpecId.Length != 0) { AnnotationSpecId = other.AnnotationSpecId; } if (other.DisplayName.Length != 0) { DisplayName = other.DisplayName; } if (other.createTime_ != null) { if (createTime_ == null) { CreateTime = new global::Google.Protobuf.WellKnownTypes.Timestamp(); } CreateTime.MergeFrom(other.CreateTime); } if (other.EvaluatedExampleCount != 0) { EvaluatedExampleCount = other.EvaluatedExampleCount; } switch (other.MetricsCase) { case MetricsOneofCase.ClassificationEvaluationMetrics: if (ClassificationEvaluationMetrics == null) { ClassificationEvaluationMetrics = new global::Google.Cloud.AutoML.V1.ClassificationEvaluationMetrics(); } ClassificationEvaluationMetrics.MergeFrom(other.ClassificationEvaluationMetrics); break; case MetricsOneofCase.TranslationEvaluationMetrics: if (TranslationEvaluationMetrics == null) { TranslationEvaluationMetrics = new global::Google.Cloud.AutoML.V1.TranslationEvaluationMetrics(); } TranslationEvaluationMetrics.MergeFrom(other.TranslationEvaluationMetrics); break; case MetricsOneofCase.ImageObjectDetectionEvaluationMetrics: if (ImageObjectDetectionEvaluationMetrics == null) { ImageObjectDetectionEvaluationMetrics = new global::Google.Cloud.AutoML.V1.ImageObjectDetectionEvaluationMetrics(); } ImageObjectDetectionEvaluationMetrics.MergeFrom(other.ImageObjectDetectionEvaluationMetrics); break; case MetricsOneofCase.TextSentimentEvaluationMetrics: if (TextSentimentEvaluationMetrics == null) { TextSentimentEvaluationMetrics = new global::Google.Cloud.AutoML.V1.TextSentimentEvaluationMetrics(); } TextSentimentEvaluationMetrics.MergeFrom(other.TextSentimentEvaluationMetrics); break; case MetricsOneofCase.TextExtractionEvaluationMetrics: if (TextExtractionEvaluationMetrics == null) { TextExtractionEvaluationMetrics = new global::Google.Cloud.AutoML.V1.TextExtractionEvaluationMetrics(); } TextExtractionEvaluationMetrics.MergeFrom(other.TextExtractionEvaluationMetrics); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }