DateSpan Class
- java.
lang. Object - com.
azure. resourcemanager. containerservice. models. DateSpan
- com.
Implements
public final class DateSpan
implements JsonSerializable<DateSpan>
A date range. For example, between '2022-12-23' and '2023-01-05'.
Constructor Summary
Constructor | Description |
---|---|
DateSpan() |
Creates an instance of Date |
Method Summary
Modifier and Type | Method and Description |
---|---|
Local |
end()
Get the end property: The end date of the date span. |
static
Date |
fromJson(JsonReader jsonReader)
Reads an instance of Date |
Local |
start()
Get the start property: The start date of the date span. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Date |
withEnd(LocalDate end)
Set the end property: The end date of the date span. |
Date |
withStart(LocalDate start)
Set the start property: The start date of the date span. |
Methods inherited from java.lang.Object
Constructor Details
DateSpan
public DateSpan()
Creates an instance of DateSpan class.
Method Details
end
public LocalDate end()
Get the end property: The end date of the date span.
Returns:
fromJson
public static DateSpan fromJson(JsonReader jsonReader)
Reads an instance of DateSpan from the JsonReader.
Parameters:
Returns:
Throws:
start
public LocalDate start()
Get the start property: The start date of the date span.
Returns:
toJson
validate
public void validate()
Validates the instance.
withEnd
public DateSpan withEnd(LocalDate end)
Set the end property: The end date of the date span.
Parameters:
Returns:
withStart
public DateSpan withStart(LocalDate start)
Set the start property: The start date of the date span.
Parameters:
Returns:
Applies to
Azure SDK for Java