Share via


ProductDetails Class

  • java.lang.Object
    • com.azure.resourcemanager.billing.models.ProductDetails

Implements

public final class ProductDetails
implements JsonSerializable<ProductDetails>

Details of the product that is transferred.

Constructor Summary

Constructor Description
ProductDetails()

Creates an instance of ProductDetails class.

Method Summary

Modifier and Type Method and Description
static ProductDetails fromJson(JsonReader jsonReader)

Reads an instance of ProductDetails from the JsonReader.

String productId()

Get the productId property: The ID of the product that is transferred.

ProductType productType()

Get the productType property: Type of the product that is transferred.

JsonWriter toJson(JsonWriter jsonWriter)
void validate()

Validates the instance.

ProductDetails withProductId(String productId)

Set the productId property: The ID of the product that is transferred.

ProductDetails withProductType(ProductType productType)

Set the productType property: Type of the product that is transferred.

Methods inherited from java.lang.Object

Constructor Details

ProductDetails

public ProductDetails()

Creates an instance of ProductDetails class.

Method Details

fromJson

public static ProductDetails fromJson(JsonReader jsonReader)

Reads an instance of ProductDetails from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of ProductDetails 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 ProductDetails.

productId

public String productId()

Get the productId property: The ID of the product that is transferred.

Returns:

the productId value.

productType

public ProductType productType()

Get the productType property: Type of the product that is transferred.

Returns:

the productType value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

validate

public void validate()

Validates the instance.

withProductId

public ProductDetails withProductId(String productId)

Set the productId property: The ID of the product that is transferred.

Parameters:

productId - the productId value to set.

Returns:

the ProductDetails object itself.

withProductType

public ProductDetails withProductType(ProductType productType)

Set the productType property: Type of the product that is transferred.

Parameters:

productType - the productType value to set.

Returns:

the ProductDetails object itself.

Applies to