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 Details

    • ReservationsProperties

      public ReservationsProperties()
      Creates an instance of ReservationsProperties class.
  • Method Details

    • reservedResourceType

      public ReservedResourceType reservedResourceType()
      Get the reservedResourceType property: The type of the resource that is being reserved.
      Returns:
      the reservedResourceType value.
    • withReservedResourceType

      public ReservationsProperties withReservedResourceType(ReservedResourceType reservedResourceType)
      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

      public InstanceFlexibility 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

      public ReservationsProperties withInstanceFlexibility(InstanceFlexibility instanceFlexibility)
      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

      public String displayName()
      Get the displayName property: Friendly name for user to easily identify the reservation.
      Returns:
      the displayName value.
    • withDisplayName

      public ReservationsProperties withDisplayName(String displayName)
      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

      public List<String> appliedScopes()
      Get the appliedScopes property: The list of applied scopes.
      Returns:
      the appliedScopes value.
    • withAppliedScopes

      public ReservationsProperties withAppliedScopes(List<String> appliedScopes)
      Set the appliedScopes property: The list of applied scopes.
      Parameters:
      appliedScopes - the appliedScopes value to set.
      Returns:
      the ReservationsProperties object itself.
    • appliedScopeType

      public AppliedScopeType appliedScopeType()
      Get the appliedScopeType property: The applied scope type.
      Returns:
      the appliedScopeType value.
    • withAppliedScopeType

      public ReservationsProperties withAppliedScopeType(AppliedScopeType appliedScopeType)
      Set the appliedScopeType property: The applied scope type.
      Parameters:
      appliedScopeType - the appliedScopeType value to set.
      Returns:
      the ReservationsProperties object itself.
    • archived

      public Boolean archived()
      Get the archived property: Indicates if the reservation is archived.
      Returns:
      the archived value.
    • withArchived

      public ReservationsProperties withArchived(Boolean archived)
      Set the archived property: Indicates if the reservation is archived.
      Parameters:
      archived - the archived value to set.
      Returns:
      the ReservationsProperties object itself.
    • capabilities

      public String capabilities()
      Get the capabilities property: Capabilities of the reservation.
      Returns:
      the capabilities value.
    • withCapabilities

      public ReservationsProperties withCapabilities(String capabilities)
      Set the capabilities property: Capabilities of the reservation.
      Parameters:
      capabilities - the capabilities value to set.
      Returns:
      the ReservationsProperties object itself.
    • quantity

      public Integer quantity()
      Get the quantity property: Quantity of the skus that are part of the reservation.
      Returns:
      the quantity value.
    • withQuantity

      public ReservationsProperties withQuantity(Integer quantity)
      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

      public ProvisioningState provisioningState()
      Get the provisioningState property: Current state of the reservation.
      Returns:
      the provisioningState value.
    • withProvisioningState

      public ReservationsProperties withProvisioningState(ProvisioningState provisioningState)
      Set the provisioningState property: Current state of the reservation.
      Parameters:
      provisioningState - the provisioningState value to set.
      Returns:
      the ReservationsProperties object itself.
    • effectiveDateTime

      public OffsetDateTime effectiveDateTime()
      Get the effectiveDateTime property: DateTime of the reservation starting when this version is effective from.
      Returns:
      the effectiveDateTime value.
    • withEffectiveDateTime

      public ReservationsProperties withEffectiveDateTime(OffsetDateTime effectiveDateTime)
      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

      public OffsetDateTime benefitStartTime()
      Get the benefitStartTime property: This is the DateTime when the reservation benefit started.
      Returns:
      the benefitStartTime value.
    • withBenefitStartTime

      public ReservationsProperties withBenefitStartTime(OffsetDateTime benefitStartTime)
      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

      public OffsetDateTime lastUpdatedDateTime()
      Get the lastUpdatedDateTime property: DateTime of the last time the reservation was updated.
      Returns:
      the lastUpdatedDateTime value.
    • expiryDate

      public LocalDate expiryDate()
      Get the expiryDate property: This is the date when the reservation will expire.
      Returns:
      the expiryDate value.
    • withExpiryDate

      public ReservationsProperties withExpiryDate(LocalDate expiryDate)
      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

      public OffsetDateTime expiryDateTime()
      Get the expiryDateTime property: This is the date-time when the reservation will expire.
      Returns:
      the expiryDateTime value.
    • withExpiryDateTime

      public ReservationsProperties withExpiryDateTime(OffsetDateTime expiryDateTime)
      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

      public OffsetDateTime reviewDateTime()
      Get the reviewDateTime property: This is the date-time when the Azure Hybrid Benefit needs to be reviewed.
      Returns:
      the reviewDateTime value.
    • withReviewDateTime

      public ReservationsProperties withReviewDateTime(OffsetDateTime reviewDateTime)
      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

      public String skuDescription()
      Get the skuDescription property: Description of the sku in english.
      Returns:
      the skuDescription value.
    • withSkuDescription

      public ReservationsProperties withSkuDescription(String skuDescription)
      Set the skuDescription property: Description of the sku in english.
      Parameters:
      skuDescription - the skuDescription value to set.
      Returns:
      the ReservationsProperties object itself.
    • extendedStatusInfo

      public ExtendedStatusInfo extendedStatusInfo()
      Get the extendedStatusInfo property: The message giving detailed information about the status code.
      Returns:
      the extendedStatusInfo value.
    • withExtendedStatusInfo

      public ReservationsProperties withExtendedStatusInfo(ExtendedStatusInfo extendedStatusInfo)
      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

      public ReservationBillingPlan billingPlan()
      Get the billingPlan property: The billing plan options available for this sku.
      Returns:
      the billingPlan value.
    • withBillingPlan

      public ReservationsProperties withBillingPlan(ReservationBillingPlan billingPlan)
      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

      public String displayProvisioningState()
      Get the displayProvisioningState property: The provisioning state of the reservation for display, e.g. Succeeded.
      Returns:
      the displayProvisioningState value.
    • provisioningSubState

      public String provisioningSubState()
      Get the provisioningSubState property: The provisioning sub-state of the reservation, e.g. Succeeded.
      Returns:
      the provisioningSubState value.
    • purchaseDate

      public LocalDate purchaseDate()
      Get the purchaseDate property: This is the date when the reservation was purchased.
      Returns:
      the purchaseDate value.
    • withPurchaseDate

      public ReservationsProperties withPurchaseDate(LocalDate purchaseDate)
      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

      public OffsetDateTime purchaseDateTime()
      Get the purchaseDateTime property: This is the date-time when the reservation was purchased.
      Returns:
      the purchaseDateTime value.
    • withPurchaseDateTime

      public ReservationsProperties withPurchaseDateTime(OffsetDateTime purchaseDateTime)
      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

      public ReservationSplitProperties splitProperties()
      Get the splitProperties property: Properties of reservation split.
      Returns:
      the splitProperties value.
    • withSplitProperties

      public ReservationsProperties withSplitProperties(ReservationSplitProperties splitProperties)
      Set the splitProperties property: Properties of reservation split.
      Parameters:
      splitProperties - the splitProperties value to set.
      Returns:
      the ReservationsProperties object itself.
    • mergeProperties

      public ReservationMergeProperties mergeProperties()
      Get the mergeProperties property: Properties of reservation merge.
      Returns:
      the mergeProperties value.
    • withMergeProperties

      public ReservationsProperties withMergeProperties(ReservationMergeProperties mergeProperties)
      Set the mergeProperties property: Properties of reservation merge.
      Parameters:
      mergeProperties - the mergeProperties value to set.
      Returns:
      the ReservationsProperties object itself.
    • swapProperties

      public ReservationSwapProperties swapProperties()
      Get the swapProperties property: Properties of reservation swap.
      Returns:
      the swapProperties value.
    • withSwapProperties

      public ReservationsProperties withSwapProperties(ReservationSwapProperties swapProperties)
      Set the swapProperties property: Properties of reservation swap.
      Parameters:
      swapProperties - the swapProperties value to set.
      Returns:
      the ReservationsProperties object itself.
    • appliedScopeProperties

      public AppliedScopeProperties 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

      public String billingScopeId()
      Get the billingScopeId property: Subscription that will be charged for purchasing reservation or savings plan.
      Returns:
      the billingScopeId value.
    • withBillingScopeId

      public ReservationsProperties withBillingScopeId(String billingScopeId)
      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

      public Boolean 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

      public ReservationsProperties withRenew(Boolean renew)
      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

      public String 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

      public ReservationsProperties withRenewSource(String renewSource)
      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

      public String 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

      public ReservationsProperties withRenewDestination(String renewDestination)
      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

      public RenewPropertiesResponse renewProperties()
      Get the renewProperties property: The renew properties for a reservation.
      Returns:
      the renewProperties value.
    • withRenewProperties

      public ReservationsProperties withRenewProperties(RenewPropertiesResponse renewProperties)
      Set the renewProperties property: The renew properties for a reservation.
      Parameters:
      renewProperties - the renewProperties value to set.
      Returns:
      the ReservationsProperties object itself.
    • term

      public ReservationTerm term()
      Get the term property: Represent the term of reservation.
      Returns:
      the term value.
    • withTerm

      public ReservationsProperties withTerm(ReservationTerm term)
      Set the term property: Represent the term of reservation.
      Parameters:
      term - the term value to set.
      Returns:
      the ReservationsProperties object itself.
    • userFriendlyAppliedScopeType

      public String userFriendlyAppliedScopeType()
      Get the userFriendlyAppliedScopeType property: The applied scope type of the reservation for display, e.g. Shared.
      Returns:
      the userFriendlyAppliedScopeType value.
    • userFriendlyRenewState

      public String userFriendlyRenewState()
      Get the userFriendlyRenewState property: The renew state of the reservation for display, e.g. On.
      Returns:
      the userFriendlyRenewState value.
    • utilization

      public ReservationsPropertiesUtilization 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

      public com.azure.json.JsonWriter toJson(com.azure.json.JsonWriter jsonWriter) throws IOException
      Specified by:
      toJson in interface com.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.