public void MergeFrom(Resource other) { if (other == null) { return; } if (other.wrapper_ != null) { if (wrapper_ == null || other.Wrapper != "") { Wrapper = other.Wrapper; } } if (other.foo_ != null) { if (foo_ == null) { Foo = new global::Google.Ads.GoogleAds.Tests.Util.Foo(); } Foo.MergeFrom(other.Foo); } foos_.Add(other.foos_); if (other.HasOptFoos) { OptFoos = other.OptFoos; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
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: { string value = _single_wrapper_codec.Read(input); if (wrapper_ == null || value != "") { Wrapper = value; } break; } case 18: { if (foo_ == null) { Foo = new global::Google.Ads.GoogleAds.Tests.Util.Foo(); } input.ReadMessage(Foo); break; } case 26: { foos_.AddEntriesFrom(input, _repeated_foos_codec); break; } case 32: { OptFoos = input.ReadInt64(); break; } } } }