Class LabCostDetailsProperties
java.lang.Object
com.azure.resourcemanager.devtestlabs.models.LabCostDetailsProperties
- All Implemented Interfaces:
com.azure.json.JsonSerializable<LabCostDetailsProperties>
public final class LabCostDetailsProperties
extends Object
implements com.azure.json.JsonSerializable<LabCostDetailsProperties>
The properties of a lab cost item.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates an instance of LabCostDetailsProperties class. -
Method Summary
Modifier and TypeMethodDescriptioncost()
Get the cost property: The cost component of the cost item.costType()
Get the costType property: The type of the cost.date()
Get the date property: The date of the cost item.static LabCostDetailsProperties
fromJson
(com.azure.json.JsonReader jsonReader) Reads an instance of LabCostDetailsProperties from the JsonReader.com.azure.json.JsonWriter
toJson
(com.azure.json.JsonWriter jsonWriter) void
validate()
Validates the instance.Set the cost property: The cost component of the cost item.withCostType
(CostType costType) Set the costType property: The type of the cost.withDate
(OffsetDateTime date) Set the date property: The date of the cost item.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
-
LabCostDetailsProperties
public LabCostDetailsProperties()Creates an instance of LabCostDetailsProperties class.
-
-
Method Details
-
date
Get the date property: The date of the cost item.- Returns:
- the date value.
-
withDate
Set the date property: The date of the cost item.- Parameters:
date
- the date value to set.- Returns:
- the LabCostDetailsProperties object itself.
-
cost
Get the cost property: The cost component of the cost item.- Returns:
- the cost value.
-
withCost
Set the cost property: The cost component of the cost item.- Parameters:
cost
- the cost value to set.- Returns:
- the LabCostDetailsProperties object itself.
-
costType
Get the costType property: The type of the cost.- Returns:
- the costType value.
-
withCostType
Set the costType property: The type of the cost.- Parameters:
costType
- the costType value to set.- Returns:
- the LabCostDetailsProperties object itself.
-
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<LabCostDetailsProperties>
- Throws:
IOException
-
fromJson
public static LabCostDetailsProperties fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of LabCostDetailsProperties from the JsonReader.- Parameters:
jsonReader
- The JsonReader being read.- Returns:
- An instance of LabCostDetailsProperties 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 LabCostDetailsProperties.
-