Ejemplo n.º 1
0
 public void MergeFrom(FeedItem 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;
         }
     }
     if (other.id_ != null)
     {
         if (id_ == null || other.Id != 0L)
         {
             Id = other.Id;
         }
     }
     if (other.startDateTime_ != null)
     {
         if (startDateTime_ == null || other.StartDateTime != "")
         {
             StartDateTime = other.StartDateTime;
         }
     }
     if (other.endDateTime_ != null)
     {
         if (endDateTime_ == null || other.EndDateTime != "")
         {
             EndDateTime = other.EndDateTime;
         }
     }
     attributeValues_.Add(other.attributeValues_);
     if (other.GeoTargetingRestriction != 0)
     {
         GeoTargetingRestriction = other.GeoTargetingRestriction;
     }
     urlCustomParameters_.Add(other.urlCustomParameters_);
     if (other.Status != 0)
     {
         Status = other.Status;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Ejemplo n.º 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: {
                    long?value = _single_id_codec.Read(input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 34: {
                    string value = _single_startDateTime_codec.Read(input);
                    if (startDateTime_ == null || value != "")
                    {
                        StartDateTime = value;
                    }
                    break;
                }

                case 42: {
                    string value = _single_endDateTime_codec.Read(input);
                    if (endDateTime_ == null || value != "")
                    {
                        EndDateTime = value;
                    }
                    break;
                }

                case 50: {
                    attributeValues_.AddEntriesFrom(input, _repeated_attributeValues_codec);
                    break;
                }

                case 56: {
                    geoTargetingRestriction_ = (global::Google.Ads.GoogleAds.V0.Enums.GeoTargetingRestrictionEnum.Types.GeoTargetingRestriction)input.ReadEnum();
                    break;
                }

                case 66: {
                    urlCustomParameters_.AddEntriesFrom(input, _repeated_urlCustomParameters_codec);
                    break;
                }

                case 72: {
                    status_ = (global::Google.Ads.GoogleAds.V0.Enums.FeedItemStatusEnum.Types.FeedItemStatus)input.ReadEnum();
                    break;
                }
                }
            }
        }