void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { ResourceName = input.ReadString(); break; } case 32: { Type = (global::Google.Ads.GoogleAds.V5.Enums.AssetTypeEnum.Types.AssetType)input.ReadEnum(); break; } case 42: { global::Google.Ads.GoogleAds.V5.Common.YoutubeVideoAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.YoutubeVideoAsset(); if (assetDataCase_ == AssetDataOneofCase.YoutubeVideoAsset) { subBuilder.MergeFrom(YoutubeVideoAsset); } input.ReadMessage(subBuilder); YoutubeVideoAsset = subBuilder; break; } case 50: { global::Google.Ads.GoogleAds.V5.Common.MediaBundleAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.MediaBundleAsset(); if (assetDataCase_ == AssetDataOneofCase.MediaBundleAsset) { subBuilder.MergeFrom(MediaBundleAsset); } input.ReadMessage(subBuilder); MediaBundleAsset = subBuilder; break; } case 58: { global::Google.Ads.GoogleAds.V5.Common.ImageAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.ImageAsset(); if (assetDataCase_ == AssetDataOneofCase.ImageAsset) { subBuilder.MergeFrom(ImageAsset); } input.ReadMessage(subBuilder); ImageAsset = subBuilder; break; } case 66: { global::Google.Ads.GoogleAds.V5.Common.TextAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TextAsset(); if (assetDataCase_ == AssetDataOneofCase.TextAsset) { subBuilder.MergeFrom(TextAsset); } input.ReadMessage(subBuilder); TextAsset = subBuilder; break; } case 82: { global::Google.Ads.GoogleAds.V5.Common.BookOnGoogleAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.BookOnGoogleAsset(); if (assetDataCase_ == AssetDataOneofCase.BookOnGoogleAsset) { subBuilder.MergeFrom(BookOnGoogleAsset); } input.ReadMessage(subBuilder); BookOnGoogleAsset = subBuilder; break; } case 88: { Id = input.ReadInt64(); break; } case 98: { Name = input.ReadString(); break; } } } }
public void MergeFrom(pb::CodedInputStream input) { #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE input.ReadRawMessage(this); #else uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { ResourceName = input.ReadString(); break; } case 32: { Type = (global::Google.Ads.GoogleAds.V5.Enums.AssetTypeEnum.Types.AssetType)input.ReadEnum(); break; } case 42: { global::Google.Ads.GoogleAds.V5.Common.YoutubeVideoAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.YoutubeVideoAsset(); if (assetDataCase_ == AssetDataOneofCase.YoutubeVideoAsset) { subBuilder.MergeFrom(YoutubeVideoAsset); } input.ReadMessage(subBuilder); YoutubeVideoAsset = subBuilder; break; } case 50: { global::Google.Ads.GoogleAds.V5.Common.MediaBundleAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.MediaBundleAsset(); if (assetDataCase_ == AssetDataOneofCase.MediaBundleAsset) { subBuilder.MergeFrom(MediaBundleAsset); } input.ReadMessage(subBuilder); MediaBundleAsset = subBuilder; break; } case 58: { global::Google.Ads.GoogleAds.V5.Common.ImageAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.ImageAsset(); if (assetDataCase_ == AssetDataOneofCase.ImageAsset) { subBuilder.MergeFrom(ImageAsset); } input.ReadMessage(subBuilder); ImageAsset = subBuilder; break; } case 66: { global::Google.Ads.GoogleAds.V5.Common.TextAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.TextAsset(); if (assetDataCase_ == AssetDataOneofCase.TextAsset) { subBuilder.MergeFrom(TextAsset); } input.ReadMessage(subBuilder); TextAsset = subBuilder; break; } case 82: { global::Google.Ads.GoogleAds.V5.Common.BookOnGoogleAsset subBuilder = new global::Google.Ads.GoogleAds.V5.Common.BookOnGoogleAsset(); if (assetDataCase_ == AssetDataOneofCase.BookOnGoogleAsset) { subBuilder.MergeFrom(BookOnGoogleAsset); } input.ReadMessage(subBuilder); BookOnGoogleAsset = subBuilder; break; } case 88: { Id = input.ReadInt64(); break; } case 98: { Name = input.ReadString(); break; } } } #endif }