public void MergeFrom(DiskPlacementGroup 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.ZoneId.Length != 0) { ZoneId = other.ZoneId; } if (other.Status != global::Yandex.Cloud.Compute.V1.DiskPlacementGroup.Types.Status.Unspecified) { Status = other.Status; } switch (other.PlacementStrategyCase) { case PlacementStrategyOneofCase.SpreadPlacementStrategy: if (SpreadPlacementStrategy == null) { SpreadPlacementStrategy = new global::Yandex.Cloud.Compute.V1.DiskSpreadPlacementStrategy(); } SpreadPlacementStrategy.MergeFrom(other.SpreadPlacementStrategy); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (FolderId.Length != 0) { hash ^= FolderId.GetHashCode(); } if (createdAt_ != null) { hash ^= CreatedAt.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } hash ^= Labels.GetHashCode(); if (ZoneId.Length != 0) { hash ^= ZoneId.GetHashCode(); } if (Status != global::Yandex.Cloud.Compute.V1.DiskPlacementGroup.Types.Status.Unspecified) { hash ^= Status.GetHashCode(); } if (placementStrategyCase_ == PlacementStrategyOneofCase.SpreadPlacementStrategy) { hash ^= SpreadPlacementStrategy.GetHashCode(); } hash ^= (int)placementStrategyCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public override int GetHashCode() { int hash = 1; if (Id.Length != 0) { hash ^= Id.GetHashCode(); } if (FolderId.Length != 0) { hash ^= FolderId.GetHashCode(); } if (createdAt_ != null) { hash ^= CreatedAt.GetHashCode(); } if (Name.Length != 0) { hash ^= Name.GetHashCode(); } if (Description.Length != 0) { hash ^= Description.GetHashCode(); } hash ^= Labels.GetHashCode(); if (placementStrategyCase_ == PlacementStrategyOneofCase.SpreadPlacementStrategy) { hash ^= SpreadPlacementStrategy.GetHashCode(); } hash ^= (int)placementStrategyCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }