Package com.adobe.aco.model
Class ProductOptionValue
- java.lang.Object
-
- com.adobe.aco.model.ProductOptionValue
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.4.0") public class ProductOptionValue extends ObjectProductOptionValue
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProductOptionValue.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_COLOR_HEXstatic StringSERIALIZED_NAME_IMAGE_URLstatic StringSERIALIZED_NAME_LABELstatic StringSERIALIZED_NAME_VARIANT_REFERENCE_ID
-
Constructor Summary
Constructors Constructor Description ProductOptionValue()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductOptionValuecolorHex(String colorHex)booleanequals(Object o)static ProductOptionValuefromJson(String jsonString)Create an instance of ProductOptionValue given an JSON stringStringgetColorHex()A hex representation of the color of the option value.StringgetImageUrl()Image URL of the option value.StringgetLabel()Option value labelStringgetVariantReferenceId()Option value ID.inthashCode()ProductOptionValueimageUrl(String imageUrl)ProductOptionValuelabel(String label)voidsetColorHex(String colorHex)voidsetImageUrl(String imageUrl)voidsetLabel(String label)voidsetVariantReferenceId(String variantReferenceId)StringtoJson()Convert an instance of ProductOptionValue to an JSON stringStringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues foundProductOptionValuevariantReferenceId(String variantReferenceId)
-
-
-
Field Detail
-
SERIALIZED_NAME_VARIANT_REFERENCE_ID
public static final String SERIALIZED_NAME_VARIANT_REFERENCE_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LABEL
public static final String SERIALIZED_NAME_LABEL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_COLOR_HEX
public static final String SERIALIZED_NAME_COLOR_HEX
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_IMAGE_URL
public static final String SERIALIZED_NAME_IMAGE_URL
- See Also:
- Constant Field Values
-
-
Method Detail
-
variantReferenceId
public ProductOptionValue variantReferenceId(String variantReferenceId)
-
getVariantReferenceId
@Nonnull public String getVariantReferenceId()
Option value ID. For `CONFIGURABLE` or `SWATCH` option types, this ID must match the [\"variantReferenceId\"](#operation/createProducts!path=attributes/variantReferenceId&t=request) defined in the product variant.- Returns:
- variantReferenceId
-
setVariantReferenceId
public void setVariantReferenceId(String variantReferenceId)
-
label
public ProductOptionValue label(String label)
-
getLabel
@Nullable public String getLabel()
Option value label- Returns:
- label
-
setLabel
public void setLabel(String label)
-
colorHex
public ProductOptionValue colorHex(String colorHex)
-
getColorHex
@Nullable public String getColorHex()
A hex representation of the color of the option value. Can be used for option with a SWATCH type.- Returns:
- colorHex
-
setColorHex
public void setColorHex(String colorHex)
-
imageUrl
public ProductOptionValue imageUrl(String imageUrl)
-
getImageUrl
@Nullable public String getImageUrl()
Image URL of the option value. Can be used for option with a SWATCH type.- Returns:
- imageUrl
-
setImageUrl
public void setImageUrl(String imageUrl)
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to ProductOptionValue
-
fromJson
public static ProductOptionValue fromJson(String jsonString) throws IOException
Create an instance of ProductOptionValue given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ProductOptionValue
- Throws:
IOException- if the JSON string is invalid with respect to ProductOptionValue
-
toJson
public String toJson()
Convert an instance of ProductOptionValue to an JSON string- Returns:
- JSON string
-
-