Esempio 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: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 18: {
                    string value = _single_campaign_codec.Read(input);
                    if (campaign_ == null || value != "")
                    {
                        Campaign = value;
                    }
                    break;
                }

                case 26: {
                    long?value = _single_criterionId_codec.Read(input);
                    if (criterionId_ == null || value != 0L)
                    {
                        CriterionId = value;
                    }
                    break;
                }

                case 34: {
                    double?value = _single_bidModifier_codec.Read(input);
                    if (bidModifier_ == null || value != 0D)
                    {
                        BidModifier = value;
                    }
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V4.Common.InteractionTypeInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.InteractionTypeInfo();
                    if (criterionCase_ == CriterionOneofCase.InteractionType)
                    {
                        subBuilder.MergeFrom(InteractionType);
                    }
                    input.ReadMessage(subBuilder);
                    InteractionType = subBuilder;
                    break;
                }
                }
            }
    #endif
        }
Esempio 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: {
                    ResourceName = input.ReadString();
                    break;
                }

                case 18: {
                    string value = _single_campaign_codec.Read(ref input);
                    if (campaign_ == null || value != "")
                    {
                        Campaign = value;
                    }
                    break;
                }

                case 26: {
                    long?value = _single_criterionId_codec.Read(ref input);
                    if (criterionId_ == null || value != 0L)
                    {
                        CriterionId = value;
                    }
                    break;
                }

                case 34: {
                    double?value = _single_bidModifier_codec.Read(ref input);
                    if (bidModifier_ == null || value != 0D)
                    {
                        BidModifier = value;
                    }
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V4.Common.InteractionTypeInfo subBuilder = new global::Google.Ads.GoogleAds.V4.Common.InteractionTypeInfo();
                    if (criterionCase_ == CriterionOneofCase.InteractionType)
                    {
                        subBuilder.MergeFrom(InteractionType);
                    }
                    input.ReadMessage(subBuilder);
                    InteractionType = subBuilder;
                    break;
                }
                }
            }
        }