Beispiel #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 24: {
                    status_ = (global::Google.Ads.GoogleAds.V1.Enums.AdGroupAdStatusEnum.Types.AdGroupAdStatus)input.ReadEnum();
                    break;
                }

                case 34: {
                    string value = _single_adGroup_codec.Read(input);
                    if (adGroup_ == null || value != "")
                    {
                        AdGroup = value;
                    }
                    break;
                }

                case 42: {
                    if (ad_ == null)
                    {
                        ad_ = new global::Google.Ads.GoogleAds.V1.Resources.Ad();
                    }
                    input.ReadMessage(ad_);
                    break;
                }

                case 50: {
                    if (policySummary_ == null)
                    {
                        policySummary_ = new global::Google.Ads.GoogleAds.V1.Resources.AdGroupAdPolicySummary();
                    }
                    input.ReadMessage(policySummary_);
                    break;
                }

                case 56: {
                    adStrength_ = (global::Google.Ads.GoogleAds.V1.Enums.AdStrengthEnum.Types.AdStrength)input.ReadEnum();
                    break;
                }
                }
            }
        }
Beispiel #2
0
 public void MergeFrom(AdGroupAd other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ResourceName.Length != 0)
     {
         ResourceName = other.ResourceName;
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     if (other.adGroup_ != null)
     {
         if (adGroup_ == null || other.AdGroup != "")
         {
             AdGroup = other.AdGroup;
         }
     }
     if (other.ad_ != null)
     {
         if (ad_ == null)
         {
             ad_ = new global::Google.Ads.GoogleAds.V1.Resources.Ad();
         }
         Ad.MergeFrom(other.Ad);
     }
     if (other.policySummary_ != null)
     {
         if (policySummary_ == null)
         {
             policySummary_ = new global::Google.Ads.GoogleAds.V1.Resources.AdGroupAdPolicySummary();
         }
         PolicySummary.MergeFrom(other.PolicySummary);
     }
     if (other.AdStrength != 0)
     {
         AdStrength = other.AdStrength;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }