示例#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.V1.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.V1.Enums.MimeTypeEnum.Types.MimeType)input.ReadEnum();
                    break;
                }

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