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

                case 26: {
                    long?value = _single_id_codec.Read(input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 34: {
                    string value = _single_descriptiveName_codec.Read(input);
                    if (descriptiveName_ == null || value != "")
                    {
                        DescriptiveName = value;
                    }
                    break;
                }

                case 42: {
                    string value = _single_currencyCode_codec.Read(input);
                    if (currencyCode_ == null || value != "")
                    {
                        CurrencyCode = value;
                    }
                    break;
                }

                case 50: {
                    string value = _single_timeZone_codec.Read(input);
                    if (timeZone_ == null || value != "")
                    {
                        TimeZone = value;
                    }
                    break;
                }

                case 58: {
                    string value = _single_trackingUrlTemplate_codec.Read(input);
                    if (trackingUrlTemplate_ == null || value != "")
                    {
                        TrackingUrlTemplate = value;
                    }
                    break;
                }

                case 66: {
                    bool?value = _single_autoTaggingEnabled_codec.Read(input);
                    if (autoTaggingEnabled_ == null || value != false)
                    {
                        AutoTaggingEnabled = value;
                    }
                    break;
                }

                case 74: {
                    bool?value = _single_hasPartnersBadge_codec.Read(input);
                    if (hasPartnersBadge_ == null || value != false)
                    {
                        HasPartnersBadge = value;
                    }
                    break;
                }

                case 82: {
                    if (callReportingSetting_ == null)
                    {
                        callReportingSetting_ = new global::Google.Ads.GoogleAds.V0.Resources.CallReportingSetting();
                    }
                    input.ReadMessage(callReportingSetting_);
                    break;
                }

                case 90: {
                    string value = _single_finalUrlSuffix_codec.Read(input);
                    if (finalUrlSuffix_ == null || value != "")
                    {
                        FinalUrlSuffix = value;
                    }
                    break;
                }
                }
            }
        }
Example #2
0
 public void MergeFrom(Customer other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ResourceName.Length != 0)
     {
         ResourceName = other.ResourceName;
     }
     if (other.id_ != null)
     {
         if (id_ == null || other.Id != 0L)
         {
             Id = other.Id;
         }
     }
     if (other.descriptiveName_ != null)
     {
         if (descriptiveName_ == null || other.DescriptiveName != "")
         {
             DescriptiveName = other.DescriptiveName;
         }
     }
     if (other.currencyCode_ != null)
     {
         if (currencyCode_ == null || other.CurrencyCode != "")
         {
             CurrencyCode = other.CurrencyCode;
         }
     }
     if (other.timeZone_ != null)
     {
         if (timeZone_ == null || other.TimeZone != "")
         {
             TimeZone = other.TimeZone;
         }
     }
     if (other.trackingUrlTemplate_ != null)
     {
         if (trackingUrlTemplate_ == null || other.TrackingUrlTemplate != "")
         {
             TrackingUrlTemplate = other.TrackingUrlTemplate;
         }
     }
     if (other.finalUrlSuffix_ != null)
     {
         if (finalUrlSuffix_ == null || other.FinalUrlSuffix != "")
         {
             FinalUrlSuffix = other.FinalUrlSuffix;
         }
     }
     if (other.autoTaggingEnabled_ != null)
     {
         if (autoTaggingEnabled_ == null || other.AutoTaggingEnabled != false)
         {
             AutoTaggingEnabled = other.AutoTaggingEnabled;
         }
     }
     if (other.hasPartnersBadge_ != null)
     {
         if (hasPartnersBadge_ == null || other.HasPartnersBadge != false)
         {
             HasPartnersBadge = other.HasPartnersBadge;
         }
     }
     if (other.callReportingSetting_ != null)
     {
         if (callReportingSetting_ == null)
         {
             callReportingSetting_ = new global::Google.Ads.GoogleAds.V0.Resources.CallReportingSetting();
         }
         CallReportingSetting.MergeFrom(other.CallReportingSetting);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }