Package com.adobe.aco.model
Class ProductImage
- java.lang.Object
-
- com.adobe.aco.model.ProductImage
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.4.0") public class ProductImage extends ObjectProductImage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classProductImage.CustomTypeAdapterFactorystatic classProductImage.RolesEnumGets or Sets roles
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_CUSTOM_ROLESstatic StringSERIALIZED_NAME_LABELstatic StringSERIALIZED_NAME_ROLESstatic StringSERIALIZED_NAME_URL
-
Constructor Summary
Constructors Constructor Description ProductImage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductImageaddCustomRolesItem(String customRolesItem)ProductImageaddRolesItem(ProductImage.RolesEnum rolesItem)ProductImagecustomRoles(List<String> customRoles)booleanequals(Object o)static ProductImagefromJson(String jsonString)Create an instance of ProductImage given an JSON stringList<String>getCustomRoles()Custom image role.StringgetLabel()Media resource labelList<ProductImage.RolesEnum>getRoles()Roles associated with this image that determine how the image is used on the storefront.StringgetUrl()Media resource URLinthashCode()ProductImagelabel(String label)ProductImageroles(List<ProductImage.RolesEnum> roles)voidsetCustomRoles(List<String> customRoles)voidsetLabel(String label)voidsetRoles(List<ProductImage.RolesEnum> roles)voidsetUrl(String url)StringtoJson()Convert an instance of ProductImage to an JSON stringStringtoString()ProductImageurl(String url)static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_URL
public static final String SERIALIZED_NAME_URL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_LABEL
public static final String SERIALIZED_NAME_LABEL
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ROLES
public static final String SERIALIZED_NAME_ROLES
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_CUSTOM_ROLES
public static final String SERIALIZED_NAME_CUSTOM_ROLES
- See Also:
- Constant Field Values
-
-
Method Detail
-
url
public ProductImage url(String url)
-
getUrl
@Nonnull public String getUrl()
Media resource URL- Returns:
- url
-
setUrl
public void setUrl(String url)
-
label
public ProductImage label(String label)
-
getLabel
@Nullable public String getLabel()
Media resource label- Returns:
- label
-
setLabel
public void setLabel(String label)
-
roles
public ProductImage roles(List<ProductImage.RolesEnum> roles)
-
addRolesItem
public ProductImage addRolesItem(ProductImage.RolesEnum rolesItem)
-
getRoles
@Nullable public List<ProductImage.RolesEnum> getRoles()
Roles associated with this image that determine how the image is used on the storefront. - `BASE`: Product image is visible as a main image on the Product Detail Page. - `SMALL`: Product image is visible as a main image on the Category or search result page or other product listing pages. - `THUMBNAIL`: Thumbnail images appear in the thumbnail gallery, shopping cart, etc. - `SWATCH`: A swatch can be used to illustrate the color, pattern, or texture.- Returns:
- roles
-
setRoles
public void setRoles(List<ProductImage.RolesEnum> roles)
-
customRoles
public ProductImage customRoles(List<String> customRoles)
-
addCustomRolesItem
public ProductImage addCustomRolesItem(String customRolesItem)
-
getCustomRoles
@Nullable public List<String> getCustomRoles()
Custom image role. Merchants can define custom roles in addition to the predefined values.- Returns:
- customRoles
-
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 ProductImage
-
fromJson
public static ProductImage fromJson(String jsonString) throws IOException
Create an instance of ProductImage given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of ProductImage
- Throws:
IOException- if the JSON string is invalid with respect to ProductImage
-
toJson
public String toJson()
Convert an instance of ProductImage to an JSON string- Returns:
- JSON string
-
-