Class ProductImage


  • @Generated(value="org.openapitools.codegen.languages.JavaClientCodegen",
               comments="Generator version: 7.4.0")
    public class ProductImage
    extends Object
    ProductImage
    • Constructor Detail

      • ProductImage

        public ProductImage()
    • Method Detail

      • getUrl

        @Nonnull
        public String getUrl()
        Media resource URL
        Returns:
        url
      • setUrl

        public void setUrl​(String url)
      • getLabel

        @Nullable
        public String getLabel()
        Media resource label
        Returns:
        label
      • setLabel

        public void setLabel​(String label)
      • 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
      • getCustomRoles

        @Nullable
        public List<String> getCustomRoles()
        Custom image role. Merchants can define custom roles in addition to the predefined values.
        Returns:
        customRoles
      • setCustomRoles

        public void setCustomRoles​(List<String> customRoles)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonElement

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates 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