public void MergeFrom(MaintenanceWindow other) { if (other == null) { return; } switch (other.PolicyCase) { case PolicyOneofCase.Anytime: if (Anytime == null) { Anytime = new global::Yandex.Cloud.Mdb.Postgresql.V1.AnytimeMaintenanceWindow(); } Anytime.MergeFrom(other.Anytime); break; case PolicyOneofCase.WeeklyMaintenanceWindow: if (WeeklyMaintenanceWindow == null) { WeeklyMaintenanceWindow = new global::Yandex.Cloud.Mdb.Postgresql.V1.WeeklyMaintenanceWindow(); } WeeklyMaintenanceWindow.MergeFrom(other.WeeklyMaintenanceWindow); break; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); }
public override int GetHashCode() { int hash = 1; if (policyCase_ == PolicyOneofCase.Anytime) { hash ^= Anytime.GetHashCode(); } if (policyCase_ == PolicyOneofCase.WeeklyMaintenanceWindow) { hash ^= WeeklyMaintenanceWindow.GetHashCode(); } hash ^= (int)policyCase_; if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }