Esempio n. 1
0
 public void MergeFrom(Image other)
 {
     if (other == null)
     {
         return;
     }
     if (other.Id.Length != 0)
     {
         Id = other.Id;
     }
     if (other.FolderId.Length != 0)
     {
         FolderId = other.FolderId;
     }
     if (other.createdAt_ != null)
     {
         if (createdAt_ == null)
         {
             CreatedAt = new global::Google.Protobuf.WellKnownTypes.Timestamp();
         }
         CreatedAt.MergeFrom(other.CreatedAt);
     }
     if (other.Name.Length != 0)
     {
         Name = other.Name;
     }
     if (other.Description.Length != 0)
     {
         Description = other.Description;
     }
     labels_.Add(other.labels_);
     if (other.Family.Length != 0)
     {
         Family = other.Family;
     }
     if (other.StorageSize != 0L)
     {
         StorageSize = other.StorageSize;
     }
     if (other.MinDiskSize != 0L)
     {
         MinDiskSize = other.MinDiskSize;
     }
     productIds_.Add(other.productIds_);
     if (other.Status != global::Yandex.Cloud.Compute.V1.Image.Types.Status.Unspecified)
     {
         Status = other.Status;
     }
     if (other.os_ != null)
     {
         if (os_ == null)
         {
             Os = new global::Yandex.Cloud.Compute.V1.Os();
         }
         Os.MergeFrom(other.Os);
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }
Esempio n. 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: {
                    Id = input.ReadString();
                    break;
                }

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

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

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

                case 42: {
                    Description = input.ReadString();
                    break;
                }

                case 50: {
                    labels_.AddEntriesFrom(input, _map_labels_codec);
                    break;
                }

                case 58: {
                    Family = input.ReadString();
                    break;
                }

                case 64: {
                    StorageSize = input.ReadInt64();
                    break;
                }

                case 72: {
                    MinDiskSize = input.ReadInt64();
                    break;
                }

                case 82: {
                    productIds_.AddEntriesFrom(input, _repeated_productIds_codec);
                    break;
                }

                case 88: {
                    Status = (global::Yandex.Cloud.Compute.V1.Image.Types.Status)input.ReadEnum();
                    break;
                }

                case 98: {
                    if (os_ == null)
                    {
                        Os = new global::Yandex.Cloud.Compute.V1.Os();
                    }
                    input.ReadMessage(Os);
                    break;
                }
                }
            }
        }