Class ReservationsProperties
java.lang.Object
com.azure.resourcemanager.reservations.models.ReservationsProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<ReservationsProperties>
public final class ReservationsProperties
extends Object
implements com.azure.json.JsonSerializable<ReservationsProperties>
The properties of the reservations.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of ReservationsProperties class. -
Method Summary
Modifier and TypeMethodDescriptionGet the appliedScopeProperties property: Properties specific to applied scope type.Get the appliedScopes property: The list of applied scopes.Get the appliedScopeType property: The applied scope type.archived()
Get the archived property: Indicates if the reservation is archived.Get the benefitStartTime property: This is the DateTime when the reservation benefit started.Get the billingPlan property: The billing plan options available for this sku.Get the billingScopeId property: Subscription that will be charged for purchasing reservation or savings plan.Get the capabilities property: Capabilities of the reservation.Get the displayName property: Friendly name for user to easily identify the reservation.Get the displayProvisioningState property: The provisioning state of the reservation for display, e.g.Get the effectiveDateTime property: DateTime of the reservation starting when this version is effective from.Get the expiryDate property: This is the date when the reservation will expire.Get the expiryDateTime property: This is the date-time when the reservation will expire.Get the extendedStatusInfo property: The message giving detailed information about the status code.static ReservationsProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of ReservationsProperties from the JsonReader.Get the instanceFlexibility property: Allows reservation discount to be applied across skus within the same auto fit group.Get the lastUpdatedDateTime property: DateTime of the last time the reservation was updated.Get the mergeProperties property: Properties of reservation merge.Get the provisioningState property: Current state of the reservation.Get the provisioningSubState property: The provisioning sub-state of the reservation, e.g.Get the purchaseDate property: This is the date when the reservation was purchased.Get the purchaseDateTime property: This is the date-time when the reservation was purchased.quantity()
Get the quantity property: Quantity of the skus that are part of the reservation.renew()
Get the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.Get the renewDestination property: Reservation Id of the reservation which is purchased because of renew.Get the renewProperties property: The renew properties for a reservation.Get the renewSource property: Reservation Id of the reservation from which this reservation is renewed.Get the reservedResourceType property: The type of the resource that is being reserved.Get the reviewDateTime property: This is the date-time when the Azure Hybrid Benefit needs to be reviewed.Get the skuDescription property: Description of the sku in english.Get the splitProperties property: Properties of reservation split.Get the swapProperties property: Properties of reservation swap.term()
Get the term property: Represent the term of reservation.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) Get the userFriendlyAppliedScopeType property: The applied scope type of the reservation for display, e.g.Get the userFriendlyRenewState property: The renew state of the reservation for display, e.g.Get the utilization property: Reservation utilization.void
validate()
Validates the instance.withAppliedScopeProperties
(AppliedScopeProperties appliedScopeProperties) Set the appliedScopeProperties property: Properties specific to applied scope type.withAppliedScopes
(List<String> appliedScopes) Set the appliedScopes property: The list of applied scopes.withAppliedScopeType
(AppliedScopeType appliedScopeType) Set the appliedScopeType property: The applied scope type.withArchived
(Boolean archived) Set the archived property: Indicates if the reservation is archived.withBenefitStartTime
(OffsetDateTime benefitStartTime) Set the benefitStartTime property: This is the DateTime when the reservation benefit started.withBillingPlan
(ReservationBillingPlan billingPlan) Set the billingPlan property: The billing plan options available for this sku.withBillingScopeId
(String billingScopeId) Set the billingScopeId property: Subscription that will be charged for purchasing reservation or savings plan.withCapabilities
(String capabilities) Set the capabilities property: Capabilities of the reservation.withDisplayName
(String displayName) Set the displayName property: Friendly name for user to easily identify the reservation.withEffectiveDateTime
(OffsetDateTime effectiveDateTime) Set the effectiveDateTime property: DateTime of the reservation starting when this version is effective from.withExpiryDate
(LocalDate expiryDate) Set the expiryDate property: This is the date when the reservation will expire.withExpiryDateTime
(OffsetDateTime expiryDateTime) Set the expiryDateTime property: This is the date-time when the reservation will expire.withExtendedStatusInfo
(ExtendedStatusInfo extendedStatusInfo) Set the extendedStatusInfo property: The message giving detailed information about the status code.withInstanceFlexibility
(InstanceFlexibility instanceFlexibility) Set the instanceFlexibility property: Allows reservation discount to be applied across skus within the same auto fit group.withMergeProperties
(ReservationMergeProperties mergeProperties) Set the mergeProperties property: Properties of reservation merge.withProvisioningState
(ProvisioningState provisioningState) Set the provisioningState property: Current state of the reservation.withPurchaseDate
(LocalDate purchaseDate) Set the purchaseDate property: This is the date when the reservation was purchased.withPurchaseDateTime
(OffsetDateTime purchaseDateTime) Set the purchaseDateTime property: This is the date-time when the reservation was purchased.withQuantity
(Integer quantity) Set the quantity property: Quantity of the skus that are part of the reservation.Set the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.withRenewDestination
(String renewDestination) Set the renewDestination property: Reservation Id of the reservation which is purchased because of renew.withRenewProperties
(RenewPropertiesResponse renewProperties) Set the renewProperties property: The renew properties for a reservation.withRenewSource
(String renewSource) Set the renewSource property: Reservation Id of the reservation from which this reservation is renewed.withReservedResourceType
(ReservedResourceType reservedResourceType) Set the reservedResourceType property: The type of the resource that is being reserved.withReviewDateTime
(OffsetDateTime reviewDateTime) Set the reviewDateTime property: This is the date-time when the Azure Hybrid Benefit needs to be reviewed.withSkuDescription
(String skuDescription) Set the skuDescription property: Description of the sku in english.withSplitProperties
(ReservationSplitProperties splitProperties) Set the splitProperties property: Properties of reservation split.withSwapProperties
(ReservationSwapProperties swapProperties) Set the swapProperties property: Properties of reservation swap.withTerm
(ReservationTerm term) Set the term property: Represent the term of reservation.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
ReservationsProperties
public ReservationsProperties()Creates an instance of ReservationsProperties class.
-
-
Method Details
-
reservedResourceType
Get the reservedResourceType property: The type of the resource that is being reserved.- Returns:
- the reservedResourceType value.
-
withReservedResourceType
Set the reservedResourceType property: The type of the resource that is being reserved.- Parameters:
reservedResourceType
- the reservedResourceType value to set.- Returns:
- the ReservationsProperties object itself.
-
instanceFlexibility
Get the instanceFlexibility property: Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.- Returns:
- the instanceFlexibility value.
-
withInstanceFlexibility
Set the instanceFlexibility property: Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.- Parameters:
instanceFlexibility
- the instanceFlexibility value to set.- Returns:
- the ReservationsProperties object itself.
-
displayName
Get the displayName property: Friendly name for user to easily identify the reservation.- Returns:
- the displayName value.
-
withDisplayName
Set the displayName property: Friendly name for user to easily identify the reservation.- Parameters:
displayName
- the displayName value to set.- Returns:
- the ReservationsProperties object itself.
-
appliedScopes
Get the appliedScopes property: The list of applied scopes.- Returns:
- the appliedScopes value.
-
withAppliedScopes
Set the appliedScopes property: The list of applied scopes.- Parameters:
appliedScopes
- the appliedScopes value to set.- Returns:
- the ReservationsProperties object itself.
-
appliedScopeType
Get the appliedScopeType property: The applied scope type.- Returns:
- the appliedScopeType value.
-
withAppliedScopeType
Set the appliedScopeType property: The applied scope type.- Parameters:
appliedScopeType
- the appliedScopeType value to set.- Returns:
- the ReservationsProperties object itself.
-
archived
Get the archived property: Indicates if the reservation is archived.- Returns:
- the archived value.
-
withArchived
Set the archived property: Indicates if the reservation is archived.- Parameters:
archived
- the archived value to set.- Returns:
- the ReservationsProperties object itself.
-
capabilities
Get the capabilities property: Capabilities of the reservation.- Returns:
- the capabilities value.
-
withCapabilities
Set the capabilities property: Capabilities of the reservation.- Parameters:
capabilities
- the capabilities value to set.- Returns:
- the ReservationsProperties object itself.
-
quantity
Get the quantity property: Quantity of the skus that are part of the reservation.- Returns:
- the quantity value.
-
withQuantity
Set the quantity property: Quantity of the skus that are part of the reservation.- Parameters:
quantity
- the quantity value to set.- Returns:
- the ReservationsProperties object itself.
-
provisioningState
Get the provisioningState property: Current state of the reservation.- Returns:
- the provisioningState value.
-
withProvisioningState
Set the provisioningState property: Current state of the reservation.- Parameters:
provisioningState
- the provisioningState value to set.- Returns:
- the ReservationsProperties object itself.
-
effectiveDateTime
Get the effectiveDateTime property: DateTime of the reservation starting when this version is effective from.- Returns:
- the effectiveDateTime value.
-
withEffectiveDateTime
Set the effectiveDateTime property: DateTime of the reservation starting when this version is effective from.- Parameters:
effectiveDateTime
- the effectiveDateTime value to set.- Returns:
- the ReservationsProperties object itself.
-
benefitStartTime
Get the benefitStartTime property: This is the DateTime when the reservation benefit started.- Returns:
- the benefitStartTime value.
-
withBenefitStartTime
Set the benefitStartTime property: This is the DateTime when the reservation benefit started.- Parameters:
benefitStartTime
- the benefitStartTime value to set.- Returns:
- the ReservationsProperties object itself.
-
lastUpdatedDateTime
Get the lastUpdatedDateTime property: DateTime of the last time the reservation was updated.- Returns:
- the lastUpdatedDateTime value.
-
expiryDate
Get the expiryDate property: This is the date when the reservation will expire.- Returns:
- the expiryDate value.
-
withExpiryDate
Set the expiryDate property: This is the date when the reservation will expire.- Parameters:
expiryDate
- the expiryDate value to set.- Returns:
- the ReservationsProperties object itself.
-
expiryDateTime
Get the expiryDateTime property: This is the date-time when the reservation will expire.- Returns:
- the expiryDateTime value.
-
withExpiryDateTime
Set the expiryDateTime property: This is the date-time when the reservation will expire.- Parameters:
expiryDateTime
- the expiryDateTime value to set.- Returns:
- the ReservationsProperties object itself.
-
reviewDateTime
Get the reviewDateTime property: This is the date-time when the Azure Hybrid Benefit needs to be reviewed.- Returns:
- the reviewDateTime value.
-
withReviewDateTime
Set the reviewDateTime property: This is the date-time when the Azure Hybrid Benefit needs to be reviewed.- Parameters:
reviewDateTime
- the reviewDateTime value to set.- Returns:
- the ReservationsProperties object itself.
-
skuDescription
Get the skuDescription property: Description of the sku in english.- Returns:
- the skuDescription value.
-
withSkuDescription
Set the skuDescription property: Description of the sku in english.- Parameters:
skuDescription
- the skuDescription value to set.- Returns:
- the ReservationsProperties object itself.
-
extendedStatusInfo
Get the extendedStatusInfo property: The message giving detailed information about the status code.- Returns:
- the extendedStatusInfo value.
-
withExtendedStatusInfo
Set the extendedStatusInfo property: The message giving detailed information about the status code.- Parameters:
extendedStatusInfo
- the extendedStatusInfo value to set.- Returns:
- the ReservationsProperties object itself.
-
billingPlan
Get the billingPlan property: The billing plan options available for this sku.- Returns:
- the billingPlan value.
-
withBillingPlan
Set the billingPlan property: The billing plan options available for this sku.- Parameters:
billingPlan
- the billingPlan value to set.- Returns:
- the ReservationsProperties object itself.
-
displayProvisioningState
Get the displayProvisioningState property: The provisioning state of the reservation for display, e.g. Succeeded.- Returns:
- the displayProvisioningState value.
-
provisioningSubState
Get the provisioningSubState property: The provisioning sub-state of the reservation, e.g. Succeeded.- Returns:
- the provisioningSubState value.
-
purchaseDate
Get the purchaseDate property: This is the date when the reservation was purchased.- Returns:
- the purchaseDate value.
-
withPurchaseDate
Set the purchaseDate property: This is the date when the reservation was purchased.- Parameters:
purchaseDate
- the purchaseDate value to set.- Returns:
- the ReservationsProperties object itself.
-
purchaseDateTime
Get the purchaseDateTime property: This is the date-time when the reservation was purchased.- Returns:
- the purchaseDateTime value.
-
withPurchaseDateTime
Set the purchaseDateTime property: This is the date-time when the reservation was purchased.- Parameters:
purchaseDateTime
- the purchaseDateTime value to set.- Returns:
- the ReservationsProperties object itself.
-
splitProperties
Get the splitProperties property: Properties of reservation split.- Returns:
- the splitProperties value.
-
withSplitProperties
Set the splitProperties property: Properties of reservation split.- Parameters:
splitProperties
- the splitProperties value to set.- Returns:
- the ReservationsProperties object itself.
-
mergeProperties
Get the mergeProperties property: Properties of reservation merge.- Returns:
- the mergeProperties value.
-
withMergeProperties
Set the mergeProperties property: Properties of reservation merge.- Parameters:
mergeProperties
- the mergeProperties value to set.- Returns:
- the ReservationsProperties object itself.
-
swapProperties
Get the swapProperties property: Properties of reservation swap.- Returns:
- the swapProperties value.
-
withSwapProperties
Set the swapProperties property: Properties of reservation swap.- Parameters:
swapProperties
- the swapProperties value to set.- Returns:
- the ReservationsProperties object itself.
-
appliedScopeProperties
Get the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup.- Returns:
- the appliedScopeProperties value.
-
withAppliedScopeProperties
public ReservationsProperties withAppliedScopeProperties(AppliedScopeProperties appliedScopeProperties) Set the appliedScopeProperties property: Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup.- Parameters:
appliedScopeProperties
- the appliedScopeProperties value to set.- Returns:
- the ReservationsProperties object itself.
-
billingScopeId
Get the billingScopeId property: Subscription that will be charged for purchasing reservation or savings plan.- Returns:
- the billingScopeId value.
-
withBillingScopeId
Set the billingScopeId property: Subscription that will be charged for purchasing reservation or savings plan.- Parameters:
billingScopeId
- the billingScopeId value to set.- Returns:
- the ReservationsProperties object itself.
-
renew
Get the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.- Returns:
- the renew value.
-
withRenew
Set the renew property: Setting this to true will automatically purchase a new reservation on the expiration date time.- Parameters:
renew
- the renew value to set.- Returns:
- the ReservationsProperties object itself.
-
renewSource
Get the renewSource property: Reservation Id of the reservation from which this reservation is renewed. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Returns:
- the renewSource value.
-
withRenewSource
Set the renewSource property: Reservation Id of the reservation from which this reservation is renewed. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Parameters:
renewSource
- the renewSource value to set.- Returns:
- the ReservationsProperties object itself.
-
renewDestination
Get the renewDestination property: Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Returns:
- the renewDestination value.
-
withRenewDestination
Set the renewDestination property: Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}.- Parameters:
renewDestination
- the renewDestination value to set.- Returns:
- the ReservationsProperties object itself.
-
renewProperties
Get the renewProperties property: The renew properties for a reservation.- Returns:
- the renewProperties value.
-
withRenewProperties
Set the renewProperties property: The renew properties for a reservation.- Parameters:
renewProperties
- the renewProperties value to set.- Returns:
- the ReservationsProperties object itself.
-
term
Get the term property: Represent the term of reservation.- Returns:
- the term value.
-
withTerm
Set the term property: Represent the term of reservation.- Parameters:
term
- the term value to set.- Returns:
- the ReservationsProperties object itself.
-
userFriendlyAppliedScopeType
Get the userFriendlyAppliedScopeType property: The applied scope type of the reservation for display, e.g. Shared.- Returns:
- the userFriendlyAppliedScopeType value.
-
userFriendlyRenewState
Get the userFriendlyRenewState property: The renew state of the reservation for display, e.g. On.- Returns:
- the userFriendlyRenewState value.
-
utilization
Get the utilization property: Reservation utilization.- Returns:
- the utilization value.
-
validate
public void validate()Validates the instance.- Throws:
IllegalArgumentException
- thrown if the instance is not valid.
-
toJson
- Specified by:
toJson
in interfacecom.azure.json.JsonSerializable<ReservationsProperties>
- Throws:
IOException
-
fromJson
public static ReservationsProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of ReservationsProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of ReservationsProperties 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 ReservationsProperties.
-