Class ScheduleProfile
java.lang.Object
com.azure.resourcemanager.compute.models.ScheduleProfile
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ScheduleProfile>
public final class ScheduleProfile
extends Object
implements com.azure.json.JsonSerializable<ScheduleProfile>
Defines the schedule for Block-type capacity reservations. Specifies the schedule during which capacity reservation
is active and VM or VMSS resource can be allocated using reservation. This property is required and only supported
when the capacity reservation group type is 'Block'. The scheduleProfile, start, and end fields are immutable after
creation. Minimum API version: 2025-04-01. Please refer to https://aka.ms/blockcapacityreservation for more details.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionend()Get the end property: The required end date for block capacity reservations.static ScheduleProfilefromJson(com.azure.json.JsonReader jsonReader) Reads an instance of ScheduleProfile from the JsonReader.start()Get the start property: The required start date for block capacity reservations.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) voidvalidate()Validates the instance.Set the end property: The required end date for block capacity reservations.Set the start property: The required start date for block capacity reservations.Methods inherited from class 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
-
ScheduleProfile
public ScheduleProfile()Creates an instance of ScheduleProfile class.
-
-
Method Details
-
start
Get the start property: The required start date for block capacity reservations. Must be today or within 56 days in the future. For same-day scheduling, requests must be submitted before 11:30 AM UTC. Example: 2025-06-27.- Returns:
- the start value.
-
withStart
Set the start property: The required start date for block capacity reservations. Must be today or within 56 days in the future. For same-day scheduling, requests must be submitted before 11:30 AM UTC. Example: 2025-06-27.- Parameters:
start- the start value to set.- Returns:
- the ScheduleProfile object itself.
-
end
Get the end property: The required end date for block capacity reservations. Must be after the start date, with a duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28.- Returns:
- the end value.
-
withEnd
Set the end property: The required end date for block capacity reservations. Must be after the start date, with a duration of either 1–14 whole days or 3–26 whole weeks. Example: 2025-06-28.- Parameters:
end- the end value to set.- Returns:
- the ScheduleProfile 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<ScheduleProfile>- Throws:
IOException
-
fromJson
Reads an instance of ScheduleProfile from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of ScheduleProfile if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the ScheduleProfile.
-