TimeSpan Class
- java.
lang. Object - com.
azure. resourcemanager. containerservice. models. TimeSpan
- com.
Implements
public final class TimeSpan
implements JsonSerializable<TimeSpan>
A time range. For example, between 2021-05-25T13:00:00Z and 2021-05-25T14:00:00Z.
Constructor Summary
Constructor | Description |
---|---|
TimeSpan() |
Creates an instance of Time |
Method Summary
Modifier and Type | Method and Description |
---|---|
Offset |
end()
Get the end property: The end of a time span. |
static
Time |
fromJson(JsonReader jsonReader)
Reads an instance of Time |
Offset |
start()
Get the start property: The start of a time span. |
Json |
toJson(JsonWriter jsonWriter) |
void |
validate()
Validates the instance. |
Time |
withEnd(OffsetDateTime end)
Set the end property: The end of a time span. |
Time |
withStart(OffsetDateTime start)
Set the start property: The start of a time span. |
Methods inherited from java.lang.Object
Constructor Details
TimeSpan
public TimeSpan()
Creates an instance of TimeSpan class.
Method Details
end
public OffsetDateTime end()
Get the end property: The end of a time span.
Returns:
fromJson
public static TimeSpan fromJson(JsonReader jsonReader)
Reads an instance of TimeSpan from the JsonReader.
Parameters:
Returns:
Throws:
start
public OffsetDateTime start()
Get the start property: The start of a time span.
Returns:
toJson
validate
public void validate()
Validates the instance.
withEnd
public TimeSpan withEnd(OffsetDateTime end)
Set the end property: The end of a time span.
Parameters:
Returns:
withStart
public TimeSpan withStart(OffsetDateTime start)
Set the start property: The start of a time span.
Parameters:
Returns:
Applies to
Azure SDK for Java