コード例 #1
0
        public void MergeFrom(pb::CodedInputStream input)
        {
            uint tag;

            while ((tag = input.ReadTag()) != 0)
            {
                switch (tag)
                {
                default:
                    _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
                    break;

                case 18: {
                    global::Google.Cloud.AutoML.V1.TranslationAnnotation subBuilder = new global::Google.Cloud.AutoML.V1.TranslationAnnotation();
                    if (detailCase_ == DetailOneofCase.Translation)
                    {
                        subBuilder.MergeFrom(Translation);
                    }
                    input.ReadMessage(subBuilder);
                    Translation = subBuilder;
                    break;
                }
                }
            }
        }
コード例 #2
0
        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: {
                    AnnotationSpecId = input.ReadString();
                    break;
                }

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

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

                case 34: {
                    global::Google.Cloud.AutoML.V1.ImageObjectDetectionAnnotation subBuilder = new global::Google.Cloud.AutoML.V1.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.V1.TextExtractionAnnotation subBuilder = new global::Google.Cloud.AutoML.V1.TextExtractionAnnotation();
                    if (detailCase_ == DetailOneofCase.TextExtraction)
                    {
                        subBuilder.MergeFrom(TextExtraction);
                    }
                    input.ReadMessage(subBuilder);
                    TextExtraction = subBuilder;
                    break;
                }

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