Пример #1
0
 public void MergeFrom(ImageAsset other)
 {
     if (other == null)
     {
         return;
     }
     if (other.data_ != null)
     {
         if (data_ == null || other.Data != pb::ByteString.Empty)
         {
             Data = other.Data;
         }
     }
     if (other.fileSize_ != null)
     {
         if (fileSize_ == null || other.FileSize != 0L)
         {
             FileSize = other.FileSize;
         }
     }
     if (other.MimeType != 0)
     {
         MimeType = other.MimeType;
     }
     if (other.fullSize_ != null)
     {
         if (fullSize_ == null)
         {
             FullSize = new global::Google.Ads.GoogleAds.V3.Common.ImageDimension();
         }
         FullSize.MergeFrom(other.FullSize);
     }
     _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: {
                    pb::ByteString value = _single_data_codec.Read(input);
                    if (data_ == null || value != pb::ByteString.Empty)
                    {
                        Data = value;
                    }
                    break;
                }

                case 18: {
                    long?value = _single_fileSize_codec.Read(input);
                    if (fileSize_ == null || value != 0L)
                    {
                        FileSize = value;
                    }
                    break;
                }

                case 24: {
                    MimeType = (global::Google.Ads.GoogleAds.V3.Enums.MimeTypeEnum.Types.MimeType)input.ReadEnum();
                    break;
                }

                case 34: {
                    if (fullSize_ == null)
                    {
                        FullSize = new global::Google.Ads.GoogleAds.V3.Common.ImageDimension();
                    }
                    input.ReadMessage(FullSize);
                    break;
                }
                }
            }
        }