Package com.adobe.aco.model
Class ProductConfiguration
- java.lang.Object
-
- com.adobe.aco.model.ProductConfiguration
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.4.0") public class ProductConfiguration extends ObjectProductConfiguration
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProductConfiguration.CustomTypeAdapterFactorystatic classProductConfiguration.TypeEnumOption type.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_ATTRIBUTE_CODEstatic StringSERIALIZED_NAME_DEFAULT_VARIANT_REFERENCE_IDstatic StringSERIALIZED_NAME_LABELstatic StringSERIALIZED_NAME_TYPEstatic StringSERIALIZED_NAME_VALUES
-
Constructor Summary
Constructors Constructor Description ProductConfiguration()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductConfigurationaddValuesItem(ProductOptionValue valuesItem)ProductConfigurationattributeCode(String attributeCode)ProductConfigurationdefaultVariantReferenceId(String defaultVariantReferenceId)booleanequals(Object o)static ProductConfigurationfromJson(String jsonString)Create an instance of ProductConfiguration given an JSON stringStringgetAttributeCode()Product option attribute code.StringgetDefaultVariantReferenceId()Specifies the pre-selected value variant reference id of the current option.StringgetLabel()Option labelProductConfiguration.TypeEnumgetType()Option type.List<ProductOptionValue>getValues()A list of option values.inthashCode()ProductConfigurationlabel(String label)voidsetAttributeCode(String attributeCode)voidsetDefaultVariantReferenceId(String defaultVariantReferenceId)voidsetLabel(String label)voidsetType(ProductConfiguration.TypeEnum type)voidsetValues(List<ProductOptionValue> values)StringtoJson()Convert an instance of ProductConfiguration to an JSON stringStringtoString()ProductConfigurationtype(ProductConfiguration.TypeEnum type)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues foundProductConfigurationvalues(List<ProductOptionValue> values)
-
-
-
Field Detail
-
SERIALIZED_NAME_ATTRIBUTE_CODE
public static final String SERIALIZED_NAME_ATTRIBUTE_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LABEL
public static final String SERIALIZED_NAME_LABEL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DEFAULT_VARIANT_REFERENCE_ID
public static final String SERIALIZED_NAME_DEFAULT_VARIANT_REFERENCE_ID
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_TYPE
public static final String SERIALIZED_NAME_TYPE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_VALUES
public static final String SERIALIZED_NAME_VALUES
- See Also:
- Constant Field Values
-
-
Method Detail
-
attributeCode
public ProductConfiguration attributeCode(String attributeCode)
-
getAttributeCode
@Nonnull public String getAttributeCode()
Product option attribute code. For `CONFIGURABLE` or `SWATCH` option types, this ID must match the [\"attribute code\"](#operation/createProducts!path=attributes/code&t=request) used for the configurable product (for example, \"color\").- Returns:
- attributeCode
-
setAttributeCode
public void setAttributeCode(String attributeCode)
-
label
public ProductConfiguration label(String label)
-
getLabel
@Nullable public String getLabel()
Option label- Returns:
- label
-
setLabel
public void setLabel(String label)
-
defaultVariantReferenceId
public ProductConfiguration defaultVariantReferenceId(String defaultVariantReferenceId)
-
getDefaultVariantReferenceId
@Nullable public String getDefaultVariantReferenceId()
Specifies the pre-selected value variant reference id of the current option.- Returns:
- defaultVariantReferenceId
-
setDefaultVariantReferenceId
public void setDefaultVariantReferenceId(String defaultVariantReferenceId)
-
type
public ProductConfiguration type(ProductConfiguration.TypeEnum type)
-
getType
@Nonnull public ProductConfiguration.TypeEnum getType()
Option type. Indicates the product type the option can be assigned to. - `CONFIGURABLE`: Configurable product option - `SWATCH`: Swatch product option. Must be used for color or text swatches attributes- Returns:
- type
-
setType
public void setType(ProductConfiguration.TypeEnum type)
-
values
public ProductConfiguration values(List<ProductOptionValue> values)
-
addValuesItem
public ProductConfiguration addValuesItem(ProductOptionValue valuesItem)
-
getValues
@Nonnull public List<ProductOptionValue> getValues()
A list of option values. Defines option values available to shoppers (for example, \"red\" color or \"large\" size).- Returns:
- values
-
setValues
public void setValues(List<ProductOptionValue> values)
-
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 ProductConfiguration
-
fromJson
public static ProductConfiguration fromJson(String jsonString) throws IOException
Create an instance of ProductConfiguration given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ProductConfiguration
- Throws:
IOException- if the JSON string is invalid with respect to ProductConfiguration
-
toJson
public String toJson()
Convert an instance of ProductConfiguration to an JSON string- Returns:
- JSON string
-
-