Exemplo n.º 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 18: {
                    long?value = _single_id_codec.Read(input);
                    if (id_ == null || value != 0L)
                    {
                        Id = value;
                    }
                    break;
                }

                case 26: {
                    string value = _single_name_codec.Read(input);
                    if (name_ == null || value != "")
                    {
                        Name = value;
                    }
                    break;
                }

                case 32: {
                    type_ = (global::Google.Ads.GoogleAds.V1.Enums.AssetTypeEnum.Types.AssetType)input.ReadEnum();
                    break;
                }

                case 42: {
                    global::Google.Ads.GoogleAds.V1.Common.YoutubeVideoAsset subBuilder = new global::Google.Ads.GoogleAds.V1.Common.YoutubeVideoAsset();
                    if (assetDataCase_ == AssetDataOneofCase.YoutubeVideoAsset)
                    {
                        subBuilder.MergeFrom(YoutubeVideoAsset);
                    }
                    input.ReadMessage(subBuilder);
                    YoutubeVideoAsset = subBuilder;
                    break;
                }

                case 50: {
                    global::Google.Ads.GoogleAds.V1.Common.MediaBundleAsset subBuilder = new global::Google.Ads.GoogleAds.V1.Common.MediaBundleAsset();
                    if (assetDataCase_ == AssetDataOneofCase.MediaBundleAsset)
                    {
                        subBuilder.MergeFrom(MediaBundleAsset);
                    }
                    input.ReadMessage(subBuilder);
                    MediaBundleAsset = subBuilder;
                    break;
                }

                case 58: {
                    global::Google.Ads.GoogleAds.V1.Common.ImageAsset subBuilder = new global::Google.Ads.GoogleAds.V1.Common.ImageAsset();
                    if (assetDataCase_ == AssetDataOneofCase.ImageAsset)
                    {
                        subBuilder.MergeFrom(ImageAsset);
                    }
                    input.ReadMessage(subBuilder);
                    ImageAsset = subBuilder;
                    break;
                }

                case 66: {
                    global::Google.Ads.GoogleAds.V1.Common.TextAsset subBuilder = new global::Google.Ads.GoogleAds.V1.Common.TextAsset();
                    if (assetDataCase_ == AssetDataOneofCase.TextAsset)
                    {
                        subBuilder.MergeFrom(TextAsset);
                    }
                    input.ReadMessage(subBuilder);
                    TextAsset = subBuilder;
                    break;
                }
                }
            }
        }