Class Time
java.lang.Object
com.azure.resourcemanager.storagemover.models.Time
- All Implemented Interfaces:
com.azure.json.JsonSerializable<Time>
The time of day.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic TimefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of Time from the JsonReader.inthour()Get the hour property: The hour element of the time.minute()Get the minute property: The minute element of the time.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.withHour(int hour) Set the hour property: The hour element of the time.withMinute(Minute minute) Set the minute property: The minute element of the time.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
Time
public Time()Creates an instance of Time class.
-
-
Method Details
-
hour
public int hour()Get the hour property: The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.- Returns:
- the hour value.
-
withHour
Set the hour property: The hour element of the time. Allowed values range from 0 (start of the selected day) to 24 (end of the selected day). Hour value 24 cannot be combined with any other minute value but 0.- Parameters:
hour- the hour value to set.- Returns:
- the Time object itself.
-
minute
Get the minute property: The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.- Returns:
- the minute value.
-
withMinute
Set the minute property: The minute element of the time. Allowed values are 0 and 30. If not specified, its value defaults to 0.- Parameters:
minute- the minute value to set.- Returns:
- the Time object itself.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException- thrown if the instance is not valid.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<Time>- Throws:
IOException
-
fromJson
Reads an instance of Time from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of Time if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the Time.
-