コード例 #1
0
 public void MergeFrom(ClickView other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ResourceName.Length != 0)
     {
         ResourceName = other.ResourceName;
     }
     if (other.gclid_ != null)
     {
         if (gclid_ == null || other.Gclid != "")
         {
             Gclid = other.Gclid;
         }
     }
     if (other.areaOfInterest_ != null)
     {
         if (areaOfInterest_ == null)
         {
             AreaOfInterest = new global::Google.Ads.GoogleAds.V4.Common.ClickLocation();
         }
         AreaOfInterest.MergeFrom(other.AreaOfInterest);
     }
     if (other.locationOfPresence_ != null)
     {
         if (locationOfPresence_ == null)
         {
             LocationOfPresence = new global::Google.Ads.GoogleAds.V4.Common.ClickLocation();
         }
         LocationOfPresence.MergeFrom(other.LocationOfPresence);
     }
     if (other.pageNumber_ != null)
     {
         if (pageNumber_ == null || other.PageNumber != 0L)
         {
             PageNumber = other.PageNumber;
         }
     }
     if (other.adGroupAd_ != null)
     {
         if (adGroupAd_ == null || other.AdGroupAd != "")
         {
             AdGroupAd = other.AdGroupAd;
         }
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
コード例 #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_gclid_codec.Read(ref input);
                    if (gclid_ == null || value != "")
                    {
                        Gclid = value;
                    }
                    break;
                }

                case 26: {
                    if (areaOfInterest_ == null)
                    {
                        AreaOfInterest = new global::Google.Ads.GoogleAds.V4.Common.ClickLocation();
                    }
                    input.ReadMessage(AreaOfInterest);
                    break;
                }

                case 34: {
                    if (locationOfPresence_ == null)
                    {
                        LocationOfPresence = new global::Google.Ads.GoogleAds.V4.Common.ClickLocation();
                    }
                    input.ReadMessage(LocationOfPresence);
                    break;
                }

                case 42: {
                    long?value = _single_pageNumber_codec.Read(ref input);
                    if (pageNumber_ == null || value != 0L)
                    {
                        PageNumber = value;
                    }
                    break;
                }

                case 58: {
                    string value = _single_adGroupAd_codec.Read(ref input);
                    if (adGroupAd_ == null || value != "")
                    {
                        AdGroupAd = value;
                    }
                    break;
                }
                }
            }
        }
コード例 #3
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_gclid_codec.Read(input);
                    if (gclid_ == null || value != "")
                    {
                        Gclid = value;
                    }
                    break;
                }

                case 26: {
                    if (areaOfInterest_ == null)
                    {
                        AreaOfInterest = new global::Google.Ads.GoogleAds.V4.Common.ClickLocation();
                    }
                    input.ReadMessage(AreaOfInterest);
                    break;
                }

                case 34: {
                    if (locationOfPresence_ == null)
                    {
                        LocationOfPresence = new global::Google.Ads.GoogleAds.V4.Common.ClickLocation();
                    }
                    input.ReadMessage(LocationOfPresence);
                    break;
                }

                case 42: {
                    long?value = _single_pageNumber_codec.Read(input);
                    if (pageNumber_ == null || value != 0L)
                    {
                        PageNumber = value;
                    }
                    break;
                }

                case 58: {
                    string value = _single_adGroupAd_codec.Read(input);
                    if (adGroupAd_ == null || value != "")
                    {
                        AdGroupAd = value;
                    }
                    break;
                }
                }
            }
    #endif
        }