Exemple #1
0
 public void MergeFrom(Dataset other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Consumer.Length != 0)
     {
         Consumer = other.Consumer;
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Type.Length != 0)
     {
         Type = other.Type;
     }
     tags_.Add(other.tags_);
     targets_.Add(other.targets_);
     if (other.retentionPolicy_ != null)
     {
         if (retentionPolicy_ == null)
         {
             RetentionPolicy = new global::Asgt.Type.RetentionPolicy();
         }
         RetentionPolicy.MergeFrom(other.RetentionPolicy);
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.updatedAt_ != null)
     {
         if (updatedAt_ == null)
         {
             UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         UpdatedAt.MergeFrom(other.UpdatedAt);
     }
     if (other.Size != 0L)
     {
         Size = other.Size;
     }
     if (other.truncatedAt_ != null)
     {
         if (truncatedAt_ == null)
         {
             TruncatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         TruncatedAt.MergeFrom(other.TruncatedAt);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Exemple #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: {
                    Consumer = input.ReadString();
                    break;
                }

                case 18: {
                    Name = input.ReadString();
                    break;
                }

                case 26: {
                    Type = input.ReadString();
                    break;
                }

                case 34: {
                    tags_.AddEntriesFrom(input, _repeated_tags_codec);
                    break;
                }

                case 42: {
                    targets_.AddEntriesFrom(input, _repeated_targets_codec);
                    break;
                }

                case 74: {
                    if (retentionPolicy_ == null)
                    {
                        RetentionPolicy = new global::Asgt.Type.RetentionPolicy();
                    }
                    input.ReadMessage(RetentionPolicy);
                    break;
                }

                case 82: {
                    if (createdAt_ == null)
                    {
                        CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(CreatedAt);
                    break;
                }

                case 90: {
                    if (updatedAt_ == null)
                    {
                        UpdatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(UpdatedAt);
                    break;
                }

                case 96: {
                    Size = input.ReadInt64();
                    break;
                }

                case 106: {
                    if (truncatedAt_ == null)
                    {
                        TruncatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
                    }
                    input.ReadMessage(TruncatedAt);
                    break;
                }
                }
            }
        }