Package com.adobe.aco.model
Class ProductBundle
- java.lang.Object
-
- com.adobe.aco.model.ProductBundle
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.4.0") public class ProductBundle extends ObjectProductBundle
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProductBundle.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_DEFAULT_ITEM_SKUSstatic StringSERIALIZED_NAME_GROUPstatic StringSERIALIZED_NAME_ITEMSstatic StringSERIALIZED_NAME_MULTI_SELECTstatic StringSERIALIZED_NAME_REQUIRED
-
Constructor Summary
Constructors Constructor Description ProductBundle()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductBundleaddDefaultItemSkusItem(String defaultItemSkusItem)ProductBundleaddItemsItem(ProductBundleItem itemsItem)ProductBundledefaultItemSkus(List<String> defaultItemSkus)booleanequals(Object o)static ProductBundlefromJson(String jsonString)Create an instance of ProductBundle given an JSON stringList<String>getDefaultItemSkus()A list of default product SKUs that are selected in this bundle group.StringgetGroup()Name of the group that organizes the bundle items.List<ProductBundleItem>getItems()A list of individual products that are part of the bundle.BooleangetMultiSelect()Indicates whether multiple products can be selected by a shopper.BooleangetRequired()Indicates whether a shopper is required to select any products from this group to add the bundle to the shopping cart.ProductBundlegroup(String group)inthashCode()ProductBundleitems(List<ProductBundleItem> items)ProductBundlemultiSelect(Boolean multiSelect)ProductBundlerequired(Boolean required)voidsetDefaultItemSkus(List<String> defaultItemSkus)voidsetGroup(String group)voidsetItems(List<ProductBundleItem> items)voidsetMultiSelect(Boolean multiSelect)voidsetRequired(Boolean required)StringtoJson()Convert an instance of ProductBundle to an JSON stringStringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_GROUP
public static final String SERIALIZED_NAME_GROUP
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_REQUIRED
public static final String SERIALIZED_NAME_REQUIRED
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_MULTI_SELECT
public static final String SERIALIZED_NAME_MULTI_SELECT
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_DEFAULT_ITEM_SKUS
public static final String SERIALIZED_NAME_DEFAULT_ITEM_SKUS
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ITEMS
public static final String SERIALIZED_NAME_ITEMS
- See Also:
- Constant Field Values
-
-
Method Detail
-
group
public ProductBundle group(String group)
-
getGroup
@Nonnull public String getGroup()
Name of the group that organizes the bundle items. This helps in categorizing the items within the bundle for better organization. For example, groups can be \"shirts\", \"pants\", \"accessories\", etc.- Returns:
- group
-
setGroup
public void setGroup(String group)
-
required
public ProductBundle required(Boolean required)
-
getRequired
@Nullable public Boolean getRequired()
Indicates whether a shopper is required to select any products from this group to add the bundle to the shopping cart.- Returns:
- required
-
setRequired
public void setRequired(Boolean required)
-
multiSelect
public ProductBundle multiSelect(Boolean multiSelect)
-
getMultiSelect
@Nullable public Boolean getMultiSelect()
Indicates whether multiple products can be selected by a shopper.- Returns:
- multiSelect
-
setMultiSelect
public void setMultiSelect(Boolean multiSelect)
-
defaultItemSkus
public ProductBundle defaultItemSkus(List<String> defaultItemSkus)
-
addDefaultItemSkusItem
public ProductBundle addDefaultItemSkusItem(String defaultItemSkusItem)
-
getDefaultItemSkus
@Nullable public List<String> getDefaultItemSkus()
A list of default product SKUs that are selected in this bundle group.- Returns:
- defaultItemSkus
-
items
public ProductBundle items(List<ProductBundleItem> items)
-
addItemsItem
public ProductBundle addItemsItem(ProductBundleItem itemsItem)
-
getItems
@Nonnull public List<ProductBundleItem> getItems()
A list of individual products that are part of the bundle. Each item in the list represents a product that can be selected as part of the bundle.- Returns:
- items
-
setItems
public void setItems(List<ProductBundleItem> items)
-
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 ProductBundle
-
fromJson
public static ProductBundle fromJson(String jsonString) throws IOException
Create an instance of ProductBundle given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ProductBundle
- Throws:
IOException- if the JSON string is invalid with respect to ProductBundle
-
toJson
public String toJson()
Convert an instance of ProductBundle to an JSON string- Returns:
- JSON string
-
-