Ejemplo n.º 1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
    #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
            input.ReadRawMessage(this);
    #else
            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.V1Beta1.ClassificationEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.ClassificationEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.ClassificationEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(ClassificationEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    ClassificationEvaluationMetrics = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Cloud.Automl.V1Beta1.TranslationEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.TranslationEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.TranslationEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(TranslationEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    TranslationEvaluationMetrics = subBuilder;
                    break;
                }

                case 90: {
                    global::Google.Cloud.Automl.V1Beta1.TextSentimentEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextSentimentEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.TextSentimentEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(TextSentimentEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    TextSentimentEvaluationMetrics = subBuilder;
                    break;
                }

                case 98: {
                    global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.ImageObjectDetectionEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(ImageObjectDetectionEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    ImageObjectDetectionEvaluationMetrics = subBuilder;
                    break;
                }

                case 106: {
                    global::Google.Cloud.Automl.V1Beta1.TextExtractionEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextExtractionEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.TextExtractionEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(TextExtractionEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    TextExtractionEvaluationMetrics = subBuilder;
                    break;
                }

                case 114: {
                    global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.VideoObjectTrackingEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(VideoObjectTrackingEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    VideoObjectTrackingEvaluationMetrics = subBuilder;
                    break;
                }

                case 122: {
                    DisplayName = input.ReadString();
                    break;
                }

                case 194: {
                    global::Google.Cloud.Automl.V1Beta1.RegressionEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.RegressionEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.RegressionEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(RegressionEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    RegressionEvaluationMetrics = subBuilder;
                    break;
                }
                }
            }
    #endif
        }
Ejemplo n.º 2
0
        void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref 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.V1Beta1.ClassificationEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.ClassificationEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.ClassificationEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(ClassificationEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    ClassificationEvaluationMetrics = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Cloud.Automl.V1Beta1.TranslationEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.TranslationEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.TranslationEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(TranslationEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    TranslationEvaluationMetrics = subBuilder;
                    break;
                }

                case 90: {
                    global::Google.Cloud.Automl.V1Beta1.TextSentimentEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextSentimentEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.TextSentimentEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(TextSentimentEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    TextSentimentEvaluationMetrics = subBuilder;
                    break;
                }

                case 98: {
                    global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.ImageObjectDetectionEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(ImageObjectDetectionEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    ImageObjectDetectionEvaluationMetrics = subBuilder;
                    break;
                }

                case 106: {
                    global::Google.Cloud.Automl.V1Beta1.TextExtractionEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextExtractionEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.TextExtractionEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(TextExtractionEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    TextExtractionEvaluationMetrics = subBuilder;
                    break;
                }

                case 114: {
                    global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.VideoObjectTrackingEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(VideoObjectTrackingEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    VideoObjectTrackingEvaluationMetrics = subBuilder;
                    break;
                }

                case 122: {
                    DisplayName = input.ReadString();
                    break;
                }

                case 194: {
                    global::Google.Cloud.Automl.V1Beta1.RegressionEvaluationMetrics subBuilder = new global::Google.Cloud.Automl.V1Beta1.RegressionEvaluationMetrics();
                    if (metricsCase_ == MetricsOneofCase.RegressionEvaluationMetrics)
                    {
                        subBuilder.MergeFrom(RegressionEvaluationMetrics);
                    }
                    input.ReadMessage(subBuilder);
                    RegressionEvaluationMetrics = subBuilder;
                    break;
                }
                }
            }
        }
Ejemplo n.º 3
0
        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.V1Beta1.ClassificationEvaluationMetrics();
                }
                ClassificationEvaluationMetrics.MergeFrom(other.ClassificationEvaluationMetrics);
                break;

            case MetricsOneofCase.RegressionEvaluationMetrics:
                if (RegressionEvaluationMetrics == null)
                {
                    RegressionEvaluationMetrics = new global::Google.Cloud.Automl.V1Beta1.RegressionEvaluationMetrics();
                }
                RegressionEvaluationMetrics.MergeFrom(other.RegressionEvaluationMetrics);
                break;

            case MetricsOneofCase.TranslationEvaluationMetrics:
                if (TranslationEvaluationMetrics == null)
                {
                    TranslationEvaluationMetrics = new global::Google.Cloud.Automl.V1Beta1.TranslationEvaluationMetrics();
                }
                TranslationEvaluationMetrics.MergeFrom(other.TranslationEvaluationMetrics);
                break;

            case MetricsOneofCase.ImageObjectDetectionEvaluationMetrics:
                if (ImageObjectDetectionEvaluationMetrics == null)
                {
                    ImageObjectDetectionEvaluationMetrics = new global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionEvaluationMetrics();
                }
                ImageObjectDetectionEvaluationMetrics.MergeFrom(other.ImageObjectDetectionEvaluationMetrics);
                break;

            case MetricsOneofCase.VideoObjectTrackingEvaluationMetrics:
                if (VideoObjectTrackingEvaluationMetrics == null)
                {
                    VideoObjectTrackingEvaluationMetrics = new global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingEvaluationMetrics();
                }
                VideoObjectTrackingEvaluationMetrics.MergeFrom(other.VideoObjectTrackingEvaluationMetrics);
                break;

            case MetricsOneofCase.TextSentimentEvaluationMetrics:
                if (TextSentimentEvaluationMetrics == null)
                {
                    TextSentimentEvaluationMetrics = new global::Google.Cloud.Automl.V1Beta1.TextSentimentEvaluationMetrics();
                }
                TextSentimentEvaluationMetrics.MergeFrom(other.TextSentimentEvaluationMetrics);
                break;

            case MetricsOneofCase.TextExtractionEvaluationMetrics:
                if (TextExtractionEvaluationMetrics == null)
                {
                    TextExtractionEvaluationMetrics = new global::Google.Cloud.Automl.V1Beta1.TextExtractionEvaluationMetrics();
                }
                TextExtractionEvaluationMetrics.MergeFrom(other.TextExtractionEvaluationMetrics);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }