/// <summary> /// Applies .proto rules to ensure that this value is in the expected ranges /// </summary> public Duration Normalize() { var seconds = Seconds; var nanos = Nanoseconds; PrimaryTypeProvider.NormalizeSecondsNanoseconds(ref seconds, ref nanos, false); return(new Duration(seconds, nanos)); }
/// <summary> /// Applies .proto rules to ensure that this value is in the expected ranges /// </summary> public Timestamp Normalize() { var seconds = Seconds; var nanos = Nanoseconds; PrimaryTypeProvider.NormalizeSecondsNanoseconds(ref seconds, ref nanos, true); return(new Timestamp(seconds, nanos)); }