davec
06/27/2022, 9:05 PMmessage DateRange {
// The beginning of the date range
google.type.Date from = 1 [(validate.rules).message.required = true];
// The end of the date range
google.type.Date until = 2 [(validate.rules).message.required = true];
}
Dariusz Kuc
06/27/2022, 9:24 PMgrpc-java
way of using builders
DateRange.newBuilder()
// set your fields using their builders
.build()
grpc-kotlin
then you should be able to use the generated DSL which should be something among the lines
dateRange {
from = ...
unti = ...
}
davec
06/27/2022, 9:29 PMcom.google.type.Date
; doesn't seem to use the DSL syntax and none of the constructors appear to be the right approach, but maybe I'm missing oneval dateRange = dateRange {
from = newBuilder().setDay(7).setMonth(7).setYear(2022).build()
until = newBuilder().setDay(12).setMonth(7).setYear(2022).build()
}
I guess what I don't get it when I'm supposed to be using the DSL syntax like dateRange { ... }
instead of the other builder syntaxDariusz Kuc
06/27/2022, 9:32 PMdate {
day = 7
month = 7
year = 2022
}
davec
06/27/2022, 9:33 PMMarc Plano-Lesay
06/28/2022, 5:40 AM