예제 #1
0
 public void MergeFrom(CustomerFeed other)
 {
     if (other == null)
     {
         return;
     }
     if (other.ResourceName.Length != 0)
     {
         ResourceName = other.ResourceName;
     }
     if (other.feed_ != null)
     {
         if (feed_ == null || other.Feed != "")
         {
             Feed = other.Feed;
         }
     }
     placeholderTypes_.Add(other.placeholderTypes_);
     if (other.matchingFunction_ != null)
     {
         if (matchingFunction_ == null)
         {
             matchingFunction_ = new global::Google.Ads.GoogleAds.V1.Common.MatchingFunction();
         }
         MatchingFunction.MergeFrom(other.MatchingFunction);
     }
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
예제 #2
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 18: {
                    string value = _single_feed_codec.Read(input);
                    if (feed_ == null || value != "")
                    {
                        Feed = value;
                    }
                    break;
                }

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

                case 34:
                case 32: {
                    placeholderTypes_.AddEntriesFrom(input, _repeated_placeholderTypes_codec);
                    break;
                }

                case 42: {
                    if (matchingFunction_ == null)
                    {
                        matchingFunction_ = new global::Google.Ads.GoogleAds.V1.Common.MatchingFunction();
                    }
                    input.ReadMessage(matchingFunction_);
                    break;
                }

                case 48: {
                    status_ = (global::Google.Ads.GoogleAds.V1.Enums.FeedLinkStatusEnum.Types.FeedLinkStatus)input.ReadEnum();
                    break;
                }
                }
            }
        }