Пример #1
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: {
                    AnnotationSpecId = input.ReadString();
                    break;
                }

                case 18: {
                    global::Google.Cloud.Automl.V1Beta1.TranslationAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TranslationAnnotation();
                    if (detailCase_ == DetailOneofCase.Translation)
                    {
                        subBuilder.MergeFrom(Translation);
                    }
                    input.ReadMessage(subBuilder);
                    Translation = subBuilder;
                    break;
                }

                case 26: {
                    global::Google.Cloud.Automl.V1Beta1.ClassificationAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.ClassificationAnnotation();
                    if (detailCase_ == DetailOneofCase.Classification)
                    {
                        subBuilder.MergeFrom(Classification);
                    }
                    input.ReadMessage(subBuilder);
                    Classification = subBuilder;
                    break;
                }

                case 34: {
                    global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionAnnotation();
                    if (detailCase_ == DetailOneofCase.ImageObjectDetection)
                    {
                        subBuilder.MergeFrom(ImageObjectDetection);
                    }
                    input.ReadMessage(subBuilder);
                    ImageObjectDetection = subBuilder;
                    break;
                }

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

                case 50: {
                    global::Google.Cloud.Automl.V1Beta1.TextExtractionAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextExtractionAnnotation();
                    if (detailCase_ == DetailOneofCase.TextExtraction)
                    {
                        subBuilder.MergeFrom(TextExtraction);
                    }
                    input.ReadMessage(subBuilder);
                    TextExtraction = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Cloud.Automl.V1Beta1.TextSentimentAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextSentimentAnnotation();
                    if (detailCase_ == DetailOneofCase.TextSentiment)
                    {
                        subBuilder.MergeFrom(TextSentiment);
                    }
                    input.ReadMessage(subBuilder);
                    TextSentiment = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingAnnotation();
                    if (detailCase_ == DetailOneofCase.VideoObjectTracking)
                    {
                        subBuilder.MergeFrom(VideoObjectTracking);
                    }
                    input.ReadMessage(subBuilder);
                    VideoObjectTracking = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Cloud.Automl.V1Beta1.VideoClassificationAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.VideoClassificationAnnotation();
                    if (detailCase_ == DetailOneofCase.VideoClassification)
                    {
                        subBuilder.MergeFrom(VideoClassification);
                    }
                    input.ReadMessage(subBuilder);
                    VideoClassification = subBuilder;
                    break;
                }

                case 82: {
                    global::Google.Cloud.Automl.V1Beta1.TablesAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TablesAnnotation();
                    if (detailCase_ == DetailOneofCase.Tables)
                    {
                        subBuilder.MergeFrom(Tables);
                    }
                    input.ReadMessage(subBuilder);
                    Tables = subBuilder;
                    break;
                }
                }
            }
        }
Пример #2
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: {
                    AnnotationSpecId = input.ReadString();
                    break;
                }

                case 18: {
                    global::Google.Cloud.Automl.V1Beta1.TranslationAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TranslationAnnotation();
                    if (detailCase_ == DetailOneofCase.Translation)
                    {
                        subBuilder.MergeFrom(Translation);
                    }
                    input.ReadMessage(subBuilder);
                    Translation = subBuilder;
                    break;
                }

                case 26: {
                    global::Google.Cloud.Automl.V1Beta1.ClassificationAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.ClassificationAnnotation();
                    if (detailCase_ == DetailOneofCase.Classification)
                    {
                        subBuilder.MergeFrom(Classification);
                    }
                    input.ReadMessage(subBuilder);
                    Classification = subBuilder;
                    break;
                }

                case 34: {
                    global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.ImageObjectDetectionAnnotation();
                    if (detailCase_ == DetailOneofCase.ImageObjectDetection)
                    {
                        subBuilder.MergeFrom(ImageObjectDetection);
                    }
                    input.ReadMessage(subBuilder);
                    ImageObjectDetection = subBuilder;
                    break;
                }

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

                case 50: {
                    global::Google.Cloud.Automl.V1Beta1.TextExtractionAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextExtractionAnnotation();
                    if (detailCase_ == DetailOneofCase.TextExtraction)
                    {
                        subBuilder.MergeFrom(TextExtraction);
                    }
                    input.ReadMessage(subBuilder);
                    TextExtraction = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Cloud.Automl.V1Beta1.TextSentimentAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TextSentimentAnnotation();
                    if (detailCase_ == DetailOneofCase.TextSentiment)
                    {
                        subBuilder.MergeFrom(TextSentiment);
                    }
                    input.ReadMessage(subBuilder);
                    TextSentiment = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.VideoObjectTrackingAnnotation();
                    if (detailCase_ == DetailOneofCase.VideoObjectTracking)
                    {
                        subBuilder.MergeFrom(VideoObjectTracking);
                    }
                    input.ReadMessage(subBuilder);
                    VideoObjectTracking = subBuilder;
                    break;
                }

                case 74: {
                    global::Google.Cloud.Automl.V1Beta1.VideoClassificationAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.VideoClassificationAnnotation();
                    if (detailCase_ == DetailOneofCase.VideoClassification)
                    {
                        subBuilder.MergeFrom(VideoClassification);
                    }
                    input.ReadMessage(subBuilder);
                    VideoClassification = subBuilder;
                    break;
                }

                case 82: {
                    global::Google.Cloud.Automl.V1Beta1.TablesAnnotation subBuilder = new global::Google.Cloud.Automl.V1Beta1.TablesAnnotation();
                    if (detailCase_ == DetailOneofCase.Tables)
                    {
                        subBuilder.MergeFrom(Tables);
                    }
                    input.ReadMessage(subBuilder);
                    Tables = subBuilder;
                    break;
                }
                }
            }
    #endif
        }