public void MergeFrom(AnnotationPayload other)
        {
            if (other == null)
            {
                return;
            }
            if (other.AnnotationSpecId.Length != 0)
            {
                AnnotationSpecId = other.AnnotationSpecId;
            }
            if (other.DisplayName.Length != 0)
            {
                DisplayName = other.DisplayName;
            }
            switch (other.DetailCase)
            {
            case DetailOneofCase.Translation:
                if (Translation == null)
                {
                    Translation = new global::Google.Cloud.AutoML.V1.TranslationAnnotation();
                }
                Translation.MergeFrom(other.Translation);
                break;

            case DetailOneofCase.Classification:
                if (Classification == null)
                {
                    Classification = new global::Google.Cloud.AutoML.V1.ClassificationAnnotation();
                }
                Classification.MergeFrom(other.Classification);
                break;

            case DetailOneofCase.ImageObjectDetection:
                if (ImageObjectDetection == null)
                {
                    ImageObjectDetection = new global::Google.Cloud.AutoML.V1.ImageObjectDetectionAnnotation();
                }
                ImageObjectDetection.MergeFrom(other.ImageObjectDetection);
                break;

            case DetailOneofCase.TextExtraction:
                if (TextExtraction == null)
                {
                    TextExtraction = new global::Google.Cloud.AutoML.V1.TextExtractionAnnotation();
                }
                TextExtraction.MergeFrom(other.TextExtraction);
                break;

            case DetailOneofCase.TextSentiment:
                if (TextSentiment == null)
                {
                    TextSentiment = new global::Google.Cloud.AutoML.V1.TextSentimentAnnotation();
                }
                TextSentiment.MergeFrom(other.TextSentiment);
                break;
            }

            _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
        }
        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;
                }
                }
            }
        }