All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.squareup.square.legacy.models.CatalogItem Maven / Gradle / Ivy

There is a newer version: 44.2.0.20250521
Show newest version
package com.squareup.square.legacy.models;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonGetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.apimatic.core.types.OptionalNullable;
import java.util.List;
import java.util.Objects;

/**
 * This is a model class for CatalogItem type.
 */
public class CatalogItem {
    private final OptionalNullable name;
    private final OptionalNullable description;
    private final OptionalNullable abbreviation;
    private final OptionalNullable labelColor;
    private final OptionalNullable isTaxable;
    private final OptionalNullable availableOnline;
    private final OptionalNullable availableForPickup;
    private final OptionalNullable availableElectronically;
    private final OptionalNullable categoryId;
    private final OptionalNullable> taxIds;
    private final OptionalNullable> modifierListInfo;
    private final OptionalNullable> variations;
    private final String productType;
    private final OptionalNullable skipModifierScreen;
    private final OptionalNullable> itemOptions;
    private final OptionalNullable> imageIds;
    private final OptionalNullable sortName;
    private final OptionalNullable> categories;
    private final OptionalNullable descriptionHtml;
    private final String descriptionPlaintext;
    private final OptionalNullable> channels;
    private final OptionalNullable isArchived;
    private final CatalogEcomSeoData ecomSeoData;
    private final CatalogItemFoodAndBeverageDetails foodAndBeverageDetails;
    private final CatalogObjectCategory reportingCategory;

    /**
     * Initialization constructor.
     * @param  name  String value for name.
     * @param  description  String value for description.
     * @param  abbreviation  String value for abbreviation.
     * @param  labelColor  String value for labelColor.
     * @param  isTaxable  Boolean value for isTaxable.
     * @param  availableOnline  Boolean value for availableOnline.
     * @param  availableForPickup  Boolean value for availableForPickup.
     * @param  availableElectronically  Boolean value for availableElectronically.
     * @param  categoryId  String value for categoryId.
     * @param  taxIds  List of String value for taxIds.
     * @param  modifierListInfo  List of CatalogItemModifierListInfo value for modifierListInfo.
     * @param  variations  List of CatalogObject value for variations.
     * @param  productType  String value for productType.
     * @param  skipModifierScreen  Boolean value for skipModifierScreen.
     * @param  itemOptions  List of CatalogItemOptionForItem value for itemOptions.
     * @param  imageIds  List of String value for imageIds.
     * @param  sortName  String value for sortName.
     * @param  categories  List of CatalogObjectCategory value for categories.
     * @param  descriptionHtml  String value for descriptionHtml.
     * @param  descriptionPlaintext  String value for descriptionPlaintext.
     * @param  channels  List of String value for channels.
     * @param  isArchived  Boolean value for isArchived.
     * @param  ecomSeoData  CatalogEcomSeoData value for ecomSeoData.
     * @param  foodAndBeverageDetails  CatalogItemFoodAndBeverageDetails value for
     *         foodAndBeverageDetails.
     * @param  reportingCategory  CatalogObjectCategory value for reportingCategory.
     */
    @JsonCreator
    public CatalogItem(
            @JsonProperty("name") String name,
            @JsonProperty("description") String description,
            @JsonProperty("abbreviation") String abbreviation,
            @JsonProperty("label_color") String labelColor,
            @JsonProperty("is_taxable") Boolean isTaxable,
            @JsonProperty("available_online") Boolean availableOnline,
            @JsonProperty("available_for_pickup") Boolean availableForPickup,
            @JsonProperty("available_electronically") Boolean availableElectronically,
            @JsonProperty("category_id") String categoryId,
            @JsonProperty("tax_ids") List taxIds,
            @JsonProperty("modifier_list_info") List modifierListInfo,
            @JsonProperty("variations") List variations,
            @JsonProperty("product_type") String productType,
            @JsonProperty("skip_modifier_screen") Boolean skipModifierScreen,
            @JsonProperty("item_options") List itemOptions,
            @JsonProperty("image_ids") List imageIds,
            @JsonProperty("sort_name") String sortName,
            @JsonProperty("categories") List categories,
            @JsonProperty("description_html") String descriptionHtml,
            @JsonProperty("description_plaintext") String descriptionPlaintext,
            @JsonProperty("channels") List channels,
            @JsonProperty("is_archived") Boolean isArchived,
            @JsonProperty("ecom_seo_data") CatalogEcomSeoData ecomSeoData,
            @JsonProperty("food_and_beverage_details") CatalogItemFoodAndBeverageDetails foodAndBeverageDetails,
            @JsonProperty("reporting_category") CatalogObjectCategory reportingCategory) {
        this.name = OptionalNullable.of(name);
        this.description = OptionalNullable.of(description);
        this.abbreviation = OptionalNullable.of(abbreviation);
        this.labelColor = OptionalNullable.of(labelColor);
        this.isTaxable = OptionalNullable.of(isTaxable);
        this.availableOnline = OptionalNullable.of(availableOnline);
        this.availableForPickup = OptionalNullable.of(availableForPickup);
        this.availableElectronically = OptionalNullable.of(availableElectronically);
        this.categoryId = OptionalNullable.of(categoryId);
        this.taxIds = OptionalNullable.of(taxIds);
        this.modifierListInfo = OptionalNullable.of(modifierListInfo);
        this.variations = OptionalNullable.of(variations);
        this.productType = productType;
        this.skipModifierScreen = OptionalNullable.of(skipModifierScreen);
        this.itemOptions = OptionalNullable.of(itemOptions);
        this.imageIds = OptionalNullable.of(imageIds);
        this.sortName = OptionalNullable.of(sortName);
        this.categories = OptionalNullable.of(categories);
        this.descriptionHtml = OptionalNullable.of(descriptionHtml);
        this.descriptionPlaintext = descriptionPlaintext;
        this.channels = OptionalNullable.of(channels);
        this.isArchived = OptionalNullable.of(isArchived);
        this.ecomSeoData = ecomSeoData;
        this.foodAndBeverageDetails = foodAndBeverageDetails;
        this.reportingCategory = reportingCategory;
    }

    /**
     * Initialization constructor.
     * @param  name  String value for name.
     * @param  description  String value for description.
     * @param  abbreviation  String value for abbreviation.
     * @param  labelColor  String value for labelColor.
     * @param  isTaxable  Boolean value for isTaxable.
     * @param  availableOnline  Boolean value for availableOnline.
     * @param  availableForPickup  Boolean value for availableForPickup.
     * @param  availableElectronically  Boolean value for availableElectronically.
     * @param  categoryId  String value for categoryId.
     * @param  taxIds  List of String value for taxIds.
     * @param  modifierListInfo  List of CatalogItemModifierListInfo value for modifierListInfo.
     * @param  variations  List of CatalogObject value for variations.
     * @param  productType  String value for productType.
     * @param  skipModifierScreen  Boolean value for skipModifierScreen.
     * @param  itemOptions  List of CatalogItemOptionForItem value for itemOptions.
     * @param  imageIds  List of String value for imageIds.
     * @param  sortName  String value for sortName.
     * @param  categories  List of CatalogObjectCategory value for categories.
     * @param  descriptionHtml  String value for descriptionHtml.
     * @param  descriptionPlaintext  String value for descriptionPlaintext.
     * @param  channels  List of String value for channels.
     * @param  isArchived  Boolean value for isArchived.
     * @param  ecomSeoData  CatalogEcomSeoData value for ecomSeoData.
     * @param  foodAndBeverageDetails  CatalogItemFoodAndBeverageDetails value for
     *         foodAndBeverageDetails.
     * @param  reportingCategory  CatalogObjectCategory value for reportingCategory.
     */
    protected CatalogItem(
            OptionalNullable name,
            OptionalNullable description,
            OptionalNullable abbreviation,
            OptionalNullable labelColor,
            OptionalNullable isTaxable,
            OptionalNullable availableOnline,
            OptionalNullable availableForPickup,
            OptionalNullable availableElectronically,
            OptionalNullable categoryId,
            OptionalNullable> taxIds,
            OptionalNullable> modifierListInfo,
            OptionalNullable> variations,
            String productType,
            OptionalNullable skipModifierScreen,
            OptionalNullable> itemOptions,
            OptionalNullable> imageIds,
            OptionalNullable sortName,
            OptionalNullable> categories,
            OptionalNullable descriptionHtml,
            String descriptionPlaintext,
            OptionalNullable> channels,
            OptionalNullable isArchived,
            CatalogEcomSeoData ecomSeoData,
            CatalogItemFoodAndBeverageDetails foodAndBeverageDetails,
            CatalogObjectCategory reportingCategory) {
        this.name = name;
        this.description = description;
        this.abbreviation = abbreviation;
        this.labelColor = labelColor;
        this.isTaxable = isTaxable;
        this.availableOnline = availableOnline;
        this.availableForPickup = availableForPickup;
        this.availableElectronically = availableElectronically;
        this.categoryId = categoryId;
        this.taxIds = taxIds;
        this.modifierListInfo = modifierListInfo;
        this.variations = variations;
        this.productType = productType;
        this.skipModifierScreen = skipModifierScreen;
        this.itemOptions = itemOptions;
        this.imageIds = imageIds;
        this.sortName = sortName;
        this.categories = categories;
        this.descriptionHtml = descriptionHtml;
        this.descriptionPlaintext = descriptionPlaintext;
        this.channels = channels;
        this.isArchived = isArchived;
        this.ecomSeoData = ecomSeoData;
        this.foodAndBeverageDetails = foodAndBeverageDetails;
        this.reportingCategory = reportingCategory;
    }

    /**
     * Internal Getter for Name.
     * The item's name. This is a searchable attribute for use in applicable query filters, its
     * value must not be empty, and the length is of Unicode code points.
     * @return Returns the Internal String
     */
    @JsonGetter("name")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetName() {
        return this.name;
    }

    /**
     * Getter for Name.
     * The item's name. This is a searchable attribute for use in applicable query filters, its
     * value must not be empty, and the length is of Unicode code points.
     * @return Returns the String
     */
    @JsonIgnore
    public String getName() {
        return OptionalNullable.getFrom(name);
    }

    /**
     * Internal Getter for Description.
     * The item's description. This is a searchable attribute for use in applicable query filters,
     * and its value length is of Unicode code points. Deprecated at 2022-07-20, this field is
     * planned to retire in 6 months. You should migrate to use `description_html` to set the
     * description of the [CatalogItem](entity:CatalogItem) instance. The `description` and
     * `description_html` field values are kept in sync. If you try to set the both fields, the
     * `description_html` text value overwrites the `description` value. Updates in one field are
     * also reflected in the other, except for when you use an early version before Square API
     * 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
     * does not nullify `description_html`.
     * @return Returns the Internal String
     */
    @JsonGetter("description")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetDescription() {
        return this.description;
    }

    /**
     * Getter for Description.
     * The item's description. This is a searchable attribute for use in applicable query filters,
     * and its value length is of Unicode code points. Deprecated at 2022-07-20, this field is
     * planned to retire in 6 months. You should migrate to use `description_html` to set the
     * description of the [CatalogItem](entity:CatalogItem) instance. The `description` and
     * `description_html` field values are kept in sync. If you try to set the both fields, the
     * `description_html` text value overwrites the `description` value. Updates in one field are
     * also reflected in the other, except for when you use an early version before Square API
     * 2022-07-20 and `description_html` is set to blank, setting the `description` value to null
     * does not nullify `description_html`.
     * @return Returns the String
     */
    @JsonIgnore
    public String getDescription() {
        return OptionalNullable.getFrom(description);
    }

    /**
     * Internal Getter for Abbreviation.
     * The text of the item's display label in the Square Point of Sale app. Only up to the first
     * five characters of the string are used. This attribute is searchable, and its value length is
     * of Unicode code points.
     * @return Returns the Internal String
     */
    @JsonGetter("abbreviation")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetAbbreviation() {
        return this.abbreviation;
    }

    /**
     * Getter for Abbreviation.
     * The text of the item's display label in the Square Point of Sale app. Only up to the first
     * five characters of the string are used. This attribute is searchable, and its value length is
     * of Unicode code points.
     * @return Returns the String
     */
    @JsonIgnore
    public String getAbbreviation() {
        return OptionalNullable.getFrom(abbreviation);
    }

    /**
     * Internal Getter for LabelColor.
     * The color of the item's display label in the Square Point of Sale app. This must be a valid
     * hex color code.
     * @return Returns the Internal String
     */
    @JsonGetter("label_color")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetLabelColor() {
        return this.labelColor;
    }

    /**
     * Getter for LabelColor.
     * The color of the item's display label in the Square Point of Sale app. This must be a valid
     * hex color code.
     * @return Returns the String
     */
    @JsonIgnore
    public String getLabelColor() {
        return OptionalNullable.getFrom(labelColor);
    }

    /**
     * Internal Getter for IsTaxable.
     * Indicates whether the item is taxable (`true`) or non-taxable (`false`). Default is `true`.
     * @return Returns the Internal Boolean
     */
    @JsonGetter("is_taxable")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetIsTaxable() {
        return this.isTaxable;
    }

    /**
     * Getter for IsTaxable.
     * Indicates whether the item is taxable (`true`) or non-taxable (`false`). Default is `true`.
     * @return Returns the Boolean
     */
    @JsonIgnore
    public Boolean getIsTaxable() {
        return OptionalNullable.getFrom(isTaxable);
    }

    /**
     * Internal Getter for AvailableOnline.
     * If `true`, the item can be added to shipping orders from the merchant's online store.
     * @return Returns the Internal Boolean
     */
    @JsonGetter("available_online")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetAvailableOnline() {
        return this.availableOnline;
    }

    /**
     * Getter for AvailableOnline.
     * If `true`, the item can be added to shipping orders from the merchant's online store.
     * @return Returns the Boolean
     */
    @JsonIgnore
    public Boolean getAvailableOnline() {
        return OptionalNullable.getFrom(availableOnline);
    }

    /**
     * Internal Getter for AvailableForPickup.
     * If `true`, the item can be added to pickup orders from the merchant's online store.
     * @return Returns the Internal Boolean
     */
    @JsonGetter("available_for_pickup")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetAvailableForPickup() {
        return this.availableForPickup;
    }

    /**
     * Getter for AvailableForPickup.
     * If `true`, the item can be added to pickup orders from the merchant's online store.
     * @return Returns the Boolean
     */
    @JsonIgnore
    public Boolean getAvailableForPickup() {
        return OptionalNullable.getFrom(availableForPickup);
    }

    /**
     * Internal Getter for AvailableElectronically.
     * If `true`, the item can be added to electronically fulfilled orders from the merchant's
     * online store.
     * @return Returns the Internal Boolean
     */
    @JsonGetter("available_electronically")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetAvailableElectronically() {
        return this.availableElectronically;
    }

    /**
     * Getter for AvailableElectronically.
     * If `true`, the item can be added to electronically fulfilled orders from the merchant's
     * online store.
     * @return Returns the Boolean
     */
    @JsonIgnore
    public Boolean getAvailableElectronically() {
        return OptionalNullable.getFrom(availableElectronically);
    }

    /**
     * Internal Getter for CategoryId.
     * The ID of the item's category, if any. Deprecated since 2023-12-13. Use
     * `CatalogItem.categories`, instead.
     * @return Returns the Internal String
     */
    @JsonGetter("category_id")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetCategoryId() {
        return this.categoryId;
    }

    /**
     * Getter for CategoryId.
     * The ID of the item's category, if any. Deprecated since 2023-12-13. Use
     * `CatalogItem.categories`, instead.
     * @return Returns the String
     */
    @JsonIgnore
    public String getCategoryId() {
        return OptionalNullable.getFrom(categoryId);
    }

    /**
     * Internal Getter for TaxIds.
     * A set of IDs indicating the taxes enabled for this item. When updating an item, any taxes
     * listed here will be added to the item. Taxes may also be added to or deleted from an item
     * using `UpdateItemTaxes`.
     * @return Returns the Internal List of String
     */
    @JsonGetter("tax_ids")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetTaxIds() {
        return this.taxIds;
    }

    /**
     * Getter for TaxIds.
     * A set of IDs indicating the taxes enabled for this item. When updating an item, any taxes
     * listed here will be added to the item. Taxes may also be added to or deleted from an item
     * using `UpdateItemTaxes`.
     * @return Returns the List of String
     */
    @JsonIgnore
    public List getTaxIds() {
        return OptionalNullable.getFrom(taxIds);
    }

    /**
     * Internal Getter for ModifierListInfo.
     * A set of `CatalogItemModifierListInfo` objects representing the modifier lists that apply to
     * this item, along with the overrides and min and max limits that are specific to this item.
     * Modifier lists may also be added to or deleted from an item using `UpdateItemModifierLists`.
     * @return Returns the Internal List of CatalogItemModifierListInfo
     */
    @JsonGetter("modifier_list_info")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetModifierListInfo() {
        return this.modifierListInfo;
    }

    /**
     * Getter for ModifierListInfo.
     * A set of `CatalogItemModifierListInfo` objects representing the modifier lists that apply to
     * this item, along with the overrides and min and max limits that are specific to this item.
     * Modifier lists may also be added to or deleted from an item using `UpdateItemModifierLists`.
     * @return Returns the List of CatalogItemModifierListInfo
     */
    @JsonIgnore
    public List getModifierListInfo() {
        return OptionalNullable.getFrom(modifierListInfo);
    }

    /**
     * Internal Getter for Variations.
     * A list of [CatalogItemVariation](entity:CatalogItemVariation) objects for this item. An item
     * must have at least one variation.
     * @return Returns the Internal List of CatalogObject
     */
    @JsonGetter("variations")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetVariations() {
        return this.variations;
    }

    /**
     * Getter for Variations.
     * A list of [CatalogItemVariation](entity:CatalogItemVariation) objects for this item. An item
     * must have at least one variation.
     * @return Returns the List of CatalogObject
     */
    @JsonIgnore
    public List getVariations() {
        return OptionalNullable.getFrom(variations);
    }

    /**
     * Getter for ProductType.
     * The type of a CatalogItem. Connect V2 only allows the creation of `REGULAR` or
     * `APPOINTMENTS_SERVICE` items.
     * @return Returns the String
     */
    @JsonGetter("product_type")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getProductType() {
        return productType;
    }

    /**
     * Internal Getter for SkipModifierScreen.
     * If `false`, the Square Point of Sale app will present the `CatalogItem`'s details screen
     * immediately, allowing the merchant to choose `CatalogModifier`s before adding the item to the
     * cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately
     * add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by
     * drilling down onto the item's details. Third-party clients are encouraged to implement
     * similar behaviors.
     * @return Returns the Internal Boolean
     */
    @JsonGetter("skip_modifier_screen")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetSkipModifierScreen() {
        return this.skipModifierScreen;
    }

    /**
     * Getter for SkipModifierScreen.
     * If `false`, the Square Point of Sale app will present the `CatalogItem`'s details screen
     * immediately, allowing the merchant to choose `CatalogModifier`s before adding the item to the
     * cart. This is the default behavior. If `true`, the Square Point of Sale app will immediately
     * add the item to the cart with the pre-selected modifiers, and merchants can edit modifiers by
     * drilling down onto the item's details. Third-party clients are encouraged to implement
     * similar behaviors.
     * @return Returns the Boolean
     */
    @JsonIgnore
    public Boolean getSkipModifierScreen() {
        return OptionalNullable.getFrom(skipModifierScreen);
    }

    /**
     * Internal Getter for ItemOptions.
     * List of item options IDs for this item. Used to manage and group item variations in a
     * specified order. Maximum: 6 item options.
     * @return Returns the Internal List of CatalogItemOptionForItem
     */
    @JsonGetter("item_options")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetItemOptions() {
        return this.itemOptions;
    }

    /**
     * Getter for ItemOptions.
     * List of item options IDs for this item. Used to manage and group item variations in a
     * specified order. Maximum: 6 item options.
     * @return Returns the List of CatalogItemOptionForItem
     */
    @JsonIgnore
    public List getItemOptions() {
        return OptionalNullable.getFrom(itemOptions);
    }

    /**
     * Internal Getter for ImageIds.
     * The IDs of images associated with this `CatalogItem` instance. These images will be shown to
     * customers in Square Online Store. The first image will show up as the icon for this item in
     * POS.
     * @return Returns the Internal List of String
     */
    @JsonGetter("image_ids")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetImageIds() {
        return this.imageIds;
    }

    /**
     * Getter for ImageIds.
     * The IDs of images associated with this `CatalogItem` instance. These images will be shown to
     * customers in Square Online Store. The first image will show up as the icon for this item in
     * POS.
     * @return Returns the List of String
     */
    @JsonIgnore
    public List getImageIds() {
        return OptionalNullable.getFrom(imageIds);
    }

    /**
     * Internal Getter for SortName.
     * A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is
     * absent, the regular `name` field is used for sorting. Its value must not be empty. It is
     * currently supported for sellers of the Japanese locale only.
     * @return Returns the Internal String
     */
    @JsonGetter("sort_name")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetSortName() {
        return this.sortName;
    }

    /**
     * Getter for SortName.
     * A name to sort the item by. If this name is unspecified, namely, the `sort_name` field is
     * absent, the regular `name` field is used for sorting. Its value must not be empty. It is
     * currently supported for sellers of the Japanese locale only.
     * @return Returns the String
     */
    @JsonIgnore
    public String getSortName() {
        return OptionalNullable.getFrom(sortName);
    }

    /**
     * Internal Getter for Categories.
     * The list of categories.
     * @return Returns the Internal List of CatalogObjectCategory
     */
    @JsonGetter("categories")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetCategories() {
        return this.categories;
    }

    /**
     * Getter for Categories.
     * The list of categories.
     * @return Returns the List of CatalogObjectCategory
     */
    @JsonIgnore
    public List getCategories() {
        return OptionalNullable.getFrom(categories);
    }

    /**
     * Internal Getter for DescriptionHtml.
     * The item's description as expressed in valid HTML elements. The length of this field value,
     * including those of HTML tags, is of Unicode points. With application query filters, the text
     * values of the HTML elements and attributes are searchable. Invalid or unsupported HTML
     * elements or attributes are ignored. Supported HTML elements include: - `a`: Link. Supports
     * linking to website URLs, email address, and telephone numbers. - `b`, `strong`: Bold text -
     * `br`: Line break - `code`: Computer code - `div`: Section - `h1-h6`: Headings - `i`, `em`:
     * Italics - `li`: List element - `ol`: Numbered list - `p`: Paragraph - `ul`: Bullet list -
     * `u`: Underline Supported HTML attributes include: - `align`: Alignment of the text content -
     * `href`: Link destination - `rel`: Relationship between link's target and source - `target`:
     * Place to open the linked document
     * @return Returns the Internal String
     */
    @JsonGetter("description_html")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetDescriptionHtml() {
        return this.descriptionHtml;
    }

    /**
     * Getter for DescriptionHtml.
     * The item's description as expressed in valid HTML elements. The length of this field value,
     * including those of HTML tags, is of Unicode points. With application query filters, the text
     * values of the HTML elements and attributes are searchable. Invalid or unsupported HTML
     * elements or attributes are ignored. Supported HTML elements include: - `a`: Link. Supports
     * linking to website URLs, email address, and telephone numbers. - `b`, `strong`: Bold text -
     * `br`: Line break - `code`: Computer code - `div`: Section - `h1-h6`: Headings - `i`, `em`:
     * Italics - `li`: List element - `ol`: Numbered list - `p`: Paragraph - `ul`: Bullet list -
     * `u`: Underline Supported HTML attributes include: - `align`: Alignment of the text content -
     * `href`: Link destination - `rel`: Relationship between link's target and source - `target`:
     * Place to open the linked document
     * @return Returns the String
     */
    @JsonIgnore
    public String getDescriptionHtml() {
        return OptionalNullable.getFrom(descriptionHtml);
    }

    /**
     * Getter for DescriptionPlaintext.
     * A server-generated plaintext version of the `description_html` field, without formatting
     * tags.
     * @return Returns the String
     */
    @JsonGetter("description_plaintext")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public String getDescriptionPlaintext() {
        return descriptionPlaintext;
    }

    /**
     * Internal Getter for Channels.
     * A list of IDs representing channels, such as a Square Online site, where the item can be made
     * visible or available.
     * @return Returns the Internal List of String
     */
    @JsonGetter("channels")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable> internalGetChannels() {
        return this.channels;
    }

    /**
     * Getter for Channels.
     * A list of IDs representing channels, such as a Square Online site, where the item can be made
     * visible or available.
     * @return Returns the List of String
     */
    @JsonIgnore
    public List getChannels() {
        return OptionalNullable.getFrom(channels);
    }

    /**
     * Internal Getter for IsArchived.
     * Indicates whether this item is archived (`true`) or not (`false`).
     * @return Returns the Internal Boolean
     */
    @JsonGetter("is_archived")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    @JsonSerialize(using = OptionalNullable.Serializer.class)
    protected OptionalNullable internalGetIsArchived() {
        return this.isArchived;
    }

    /**
     * Getter for IsArchived.
     * Indicates whether this item is archived (`true`) or not (`false`).
     * @return Returns the Boolean
     */
    @JsonIgnore
    public Boolean getIsArchived() {
        return OptionalNullable.getFrom(isArchived);
    }

    /**
     * Getter for EcomSeoData.
     * SEO data for for a seller's Square Online store.
     * @return Returns the CatalogEcomSeoData
     */
    @JsonGetter("ecom_seo_data")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public CatalogEcomSeoData getEcomSeoData() {
        return ecomSeoData;
    }

    /**
     * Getter for FoodAndBeverageDetails.
     * The food and beverage-specific details of a `FOOD_AND_BEV` item.
     * @return Returns the CatalogItemFoodAndBeverageDetails
     */
    @JsonGetter("food_and_beverage_details")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public CatalogItemFoodAndBeverageDetails getFoodAndBeverageDetails() {
        return foodAndBeverageDetails;
    }

    /**
     * Getter for ReportingCategory.
     * A category that can be assigned to an item or a parent category that can be assigned to
     * another category. For example, a clothing category can be assigned to a t-shirt item or be
     * made as the parent category to the pants category.
     * @return Returns the CatalogObjectCategory
     */
    @JsonGetter("reporting_category")
    @JsonInclude(JsonInclude.Include.NON_NULL)
    public CatalogObjectCategory getReportingCategory() {
        return reportingCategory;
    }

    @Override
    public int hashCode() {
        return Objects.hash(
                name,
                description,
                abbreviation,
                labelColor,
                isTaxable,
                availableOnline,
                availableForPickup,
                availableElectronically,
                categoryId,
                taxIds,
                modifierListInfo,
                variations,
                productType,
                skipModifierScreen,
                itemOptions,
                imageIds,
                sortName,
                categories,
                descriptionHtml,
                descriptionPlaintext,
                channels,
                isArchived,
                ecomSeoData,
                foodAndBeverageDetails,
                reportingCategory);
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof CatalogItem)) {
            return false;
        }
        CatalogItem other = (CatalogItem) obj;
        return Objects.equals(name, other.name)
                && Objects.equals(description, other.description)
                && Objects.equals(abbreviation, other.abbreviation)
                && Objects.equals(labelColor, other.labelColor)
                && Objects.equals(isTaxable, other.isTaxable)
                && Objects.equals(availableOnline, other.availableOnline)
                && Objects.equals(availableForPickup, other.availableForPickup)
                && Objects.equals(availableElectronically, other.availableElectronically)
                && Objects.equals(categoryId, other.categoryId)
                && Objects.equals(taxIds, other.taxIds)
                && Objects.equals(modifierListInfo, other.modifierListInfo)
                && Objects.equals(variations, other.variations)
                && Objects.equals(productType, other.productType)
                && Objects.equals(skipModifierScreen, other.skipModifierScreen)
                && Objects.equals(itemOptions, other.itemOptions)
                && Objects.equals(imageIds, other.imageIds)
                && Objects.equals(sortName, other.sortName)
                && Objects.equals(categories, other.categories)
                && Objects.equals(descriptionHtml, other.descriptionHtml)
                && Objects.equals(descriptionPlaintext, other.descriptionPlaintext)
                && Objects.equals(channels, other.channels)
                && Objects.equals(isArchived, other.isArchived)
                && Objects.equals(ecomSeoData, other.ecomSeoData)
                && Objects.equals(foodAndBeverageDetails, other.foodAndBeverageDetails)
                && Objects.equals(reportingCategory, other.reportingCategory);
    }

    /**
     * Converts this CatalogItem into string format.
     * @return String representation of this class
     */
    @Override
    public String toString() {
        return "CatalogItem [" + "name=" + name + ", description=" + description + ", abbreviation="
                + abbreviation + ", labelColor=" + labelColor + ", isTaxable=" + isTaxable
                + ", availableOnline=" + availableOnline + ", availableForPickup="
                + availableForPickup + ", availableElectronically=" + availableElectronically
                + ", categoryId=" + categoryId + ", taxIds=" + taxIds + ", modifierListInfo="
                + modifierListInfo + ", variations=" + variations + ", productType=" + productType
                + ", skipModifierScreen=" + skipModifierScreen + ", itemOptions=" + itemOptions
                + ", imageIds=" + imageIds + ", sortName=" + sortName + ", categories=" + categories
                + ", descriptionHtml=" + descriptionHtml + ", descriptionPlaintext="
                + descriptionPlaintext + ", channels=" + channels + ", isArchived=" + isArchived
                + ", ecomSeoData=" + ecomSeoData + ", foodAndBeverageDetails="
                + foodAndBeverageDetails + ", reportingCategory=" + reportingCategory + "]";
    }

    /**
     * Builds a new {@link CatalogItem.Builder} object.
     * Creates the instance with the state of the current model.
     * @return a new {@link CatalogItem.Builder} object
     */
    public Builder toBuilder() {
        Builder builder = new Builder()
                .productType(getProductType())
                .descriptionPlaintext(getDescriptionPlaintext())
                .ecomSeoData(getEcomSeoData())
                .foodAndBeverageDetails(getFoodAndBeverageDetails())
                .reportingCategory(getReportingCategory());
        builder.name = internalGetName();
        builder.description = internalGetDescription();
        builder.abbreviation = internalGetAbbreviation();
        builder.labelColor = internalGetLabelColor();
        builder.isTaxable = internalGetIsTaxable();
        builder.availableOnline = internalGetAvailableOnline();
        builder.availableForPickup = internalGetAvailableForPickup();
        builder.availableElectronically = internalGetAvailableElectronically();
        builder.categoryId = internalGetCategoryId();
        builder.taxIds = internalGetTaxIds();
        builder.modifierListInfo = internalGetModifierListInfo();
        builder.variations = internalGetVariations();
        builder.skipModifierScreen = internalGetSkipModifierScreen();
        builder.itemOptions = internalGetItemOptions();
        builder.imageIds = internalGetImageIds();
        builder.sortName = internalGetSortName();
        builder.categories = internalGetCategories();
        builder.descriptionHtml = internalGetDescriptionHtml();
        builder.channels = internalGetChannels();
        builder.isArchived = internalGetIsArchived();
        return builder;
    }

    /**
     * Class to build instances of {@link CatalogItem}.
     */
    public static class Builder {
        private OptionalNullable name;
        private OptionalNullable description;
        private OptionalNullable abbreviation;
        private OptionalNullable labelColor;
        private OptionalNullable isTaxable;
        private OptionalNullable availableOnline;
        private OptionalNullable availableForPickup;
        private OptionalNullable availableElectronically;
        private OptionalNullable categoryId;
        private OptionalNullable> taxIds;
        private OptionalNullable> modifierListInfo;
        private OptionalNullable> variations;
        private String productType;
        private OptionalNullable skipModifierScreen;
        private OptionalNullable> itemOptions;
        private OptionalNullable> imageIds;
        private OptionalNullable sortName;
        private OptionalNullable> categories;
        private OptionalNullable descriptionHtml;
        private String descriptionPlaintext;
        private OptionalNullable> channels;
        private OptionalNullable isArchived;
        private CatalogEcomSeoData ecomSeoData;
        private CatalogItemFoodAndBeverageDetails foodAndBeverageDetails;
        private CatalogObjectCategory reportingCategory;

        /**
         * Setter for name.
         * @param  name  String value for name.
         * @return Builder
         */
        public Builder name(String name) {
            this.name = OptionalNullable.of(name);
            return this;
        }

        /**
         * UnSetter for name.
         * @return Builder
         */
        public Builder unsetName() {
            name = null;
            return this;
        }

        /**
         * Setter for description.
         * @param  description  String value for description.
         * @return Builder
         */
        public Builder description(String description) {
            this.description = OptionalNullable.of(description);
            return this;
        }

        /**
         * UnSetter for description.
         * @return Builder
         */
        public Builder unsetDescription() {
            description = null;
            return this;
        }

        /**
         * Setter for abbreviation.
         * @param  abbreviation  String value for abbreviation.
         * @return Builder
         */
        public Builder abbreviation(String abbreviation) {
            this.abbreviation = OptionalNullable.of(abbreviation);
            return this;
        }

        /**
         * UnSetter for abbreviation.
         * @return Builder
         */
        public Builder unsetAbbreviation() {
            abbreviation = null;
            return this;
        }

        /**
         * Setter for labelColor.
         * @param  labelColor  String value for labelColor.
         * @return Builder
         */
        public Builder labelColor(String labelColor) {
            this.labelColor = OptionalNullable.of(labelColor);
            return this;
        }

        /**
         * UnSetter for labelColor.
         * @return Builder
         */
        public Builder unsetLabelColor() {
            labelColor = null;
            return this;
        }

        /**
         * Setter for isTaxable.
         * @param  isTaxable  Boolean value for isTaxable.
         * @return Builder
         */
        public Builder isTaxable(Boolean isTaxable) {
            this.isTaxable = OptionalNullable.of(isTaxable);
            return this;
        }

        /**
         * UnSetter for isTaxable.
         * @return Builder
         */
        public Builder unsetIsTaxable() {
            isTaxable = null;
            return this;
        }

        /**
         * Setter for availableOnline.
         * @param  availableOnline  Boolean value for availableOnline.
         * @return Builder
         */
        public Builder availableOnline(Boolean availableOnline) {
            this.availableOnline = OptionalNullable.of(availableOnline);
            return this;
        }

        /**
         * UnSetter for availableOnline.
         * @return Builder
         */
        public Builder unsetAvailableOnline() {
            availableOnline = null;
            return this;
        }

        /**
         * Setter for availableForPickup.
         * @param  availableForPickup  Boolean value for availableForPickup.
         * @return Builder
         */
        public Builder availableForPickup(Boolean availableForPickup) {
            this.availableForPickup = OptionalNullable.of(availableForPickup);
            return this;
        }

        /**
         * UnSetter for availableForPickup.
         * @return Builder
         */
        public Builder unsetAvailableForPickup() {
            availableForPickup = null;
            return this;
        }

        /**
         * Setter for availableElectronically.
         * @param  availableElectronically  Boolean value for availableElectronically.
         * @return Builder
         */
        public Builder availableElectronically(Boolean availableElectronically) {
            this.availableElectronically = OptionalNullable.of(availableElectronically);
            return this;
        }

        /**
         * UnSetter for availableElectronically.
         * @return Builder
         */
        public Builder unsetAvailableElectronically() {
            availableElectronically = null;
            return this;
        }

        /**
         * Setter for categoryId.
         * @param  categoryId  String value for categoryId.
         * @return Builder
         */
        public Builder categoryId(String categoryId) {
            this.categoryId = OptionalNullable.of(categoryId);
            return this;
        }

        /**
         * UnSetter for categoryId.
         * @return Builder
         */
        public Builder unsetCategoryId() {
            categoryId = null;
            return this;
        }

        /**
         * Setter for taxIds.
         * @param  taxIds  List of String value for taxIds.
         * @return Builder
         */
        public Builder taxIds(List taxIds) {
            this.taxIds = OptionalNullable.of(taxIds);
            return this;
        }

        /**
         * UnSetter for taxIds.
         * @return Builder
         */
        public Builder unsetTaxIds() {
            taxIds = null;
            return this;
        }

        /**
         * Setter for modifierListInfo.
         * @param  modifierListInfo  List of CatalogItemModifierListInfo value for modifierListInfo.
         * @return Builder
         */
        public Builder modifierListInfo(List modifierListInfo) {
            this.modifierListInfo = OptionalNullable.of(modifierListInfo);
            return this;
        }

        /**
         * UnSetter for modifierListInfo.
         * @return Builder
         */
        public Builder unsetModifierListInfo() {
            modifierListInfo = null;
            return this;
        }

        /**
         * Setter for variations.
         * @param  variations  List of CatalogObject value for variations.
         * @return Builder
         */
        public Builder variations(List variations) {
            this.variations = OptionalNullable.of(variations);
            return this;
        }

        /**
         * UnSetter for variations.
         * @return Builder
         */
        public Builder unsetVariations() {
            variations = null;
            return this;
        }

        /**
         * Setter for productType.
         * @param  productType  String value for productType.
         * @return Builder
         */
        public Builder productType(String productType) {
            this.productType = productType;
            return this;
        }

        /**
         * Setter for skipModifierScreen.
         * @param  skipModifierScreen  Boolean value for skipModifierScreen.
         * @return Builder
         */
        public Builder skipModifierScreen(Boolean skipModifierScreen) {
            this.skipModifierScreen = OptionalNullable.of(skipModifierScreen);
            return this;
        }

        /**
         * UnSetter for skipModifierScreen.
         * @return Builder
         */
        public Builder unsetSkipModifierScreen() {
            skipModifierScreen = null;
            return this;
        }

        /**
         * Setter for itemOptions.
         * @param  itemOptions  List of CatalogItemOptionForItem value for itemOptions.
         * @return Builder
         */
        public Builder itemOptions(List itemOptions) {
            this.itemOptions = OptionalNullable.of(itemOptions);
            return this;
        }

        /**
         * UnSetter for itemOptions.
         * @return Builder
         */
        public Builder unsetItemOptions() {
            itemOptions = null;
            return this;
        }

        /**
         * Setter for imageIds.
         * @param  imageIds  List of String value for imageIds.
         * @return Builder
         */
        public Builder imageIds(List imageIds) {
            this.imageIds = OptionalNullable.of(imageIds);
            return this;
        }

        /**
         * UnSetter for imageIds.
         * @return Builder
         */
        public Builder unsetImageIds() {
            imageIds = null;
            return this;
        }

        /**
         * Setter for sortName.
         * @param  sortName  String value for sortName.
         * @return Builder
         */
        public Builder sortName(String sortName) {
            this.sortName = OptionalNullable.of(sortName);
            return this;
        }

        /**
         * UnSetter for sortName.
         * @return Builder
         */
        public Builder unsetSortName() {
            sortName = null;
            return this;
        }

        /**
         * Setter for categories.
         * @param  categories  List of CatalogObjectCategory value for categories.
         * @return Builder
         */
        public Builder categories(List categories) {
            this.categories = OptionalNullable.of(categories);
            return this;
        }

        /**
         * UnSetter for categories.
         * @return Builder
         */
        public Builder unsetCategories() {
            categories = null;
            return this;
        }

        /**
         * Setter for descriptionHtml.
         * @param  descriptionHtml  String value for descriptionHtml.
         * @return Builder
         */
        public Builder descriptionHtml(String descriptionHtml) {
            this.descriptionHtml = OptionalNullable.of(descriptionHtml);
            return this;
        }

        /**
         * UnSetter for descriptionHtml.
         * @return Builder
         */
        public Builder unsetDescriptionHtml() {
            descriptionHtml = null;
            return this;
        }

        /**
         * Setter for descriptionPlaintext.
         * @param  descriptionPlaintext  String value for descriptionPlaintext.
         * @return Builder
         */
        public Builder descriptionPlaintext(String descriptionPlaintext) {
            this.descriptionPlaintext = descriptionPlaintext;
            return this;
        }

        /**
         * Setter for channels.
         * @param  channels  List of String value for channels.
         * @return Builder
         */
        public Builder channels(List channels) {
            this.channels = OptionalNullable.of(channels);
            return this;
        }

        /**
         * UnSetter for channels.
         * @return Builder
         */
        public Builder unsetChannels() {
            channels = null;
            return this;
        }

        /**
         * Setter for isArchived.
         * @param  isArchived  Boolean value for isArchived.
         * @return Builder
         */
        public Builder isArchived(Boolean isArchived) {
            this.isArchived = OptionalNullable.of(isArchived);
            return this;
        }

        /**
         * UnSetter for isArchived.
         * @return Builder
         */
        public Builder unsetIsArchived() {
            isArchived = null;
            return this;
        }

        /**
         * Setter for ecomSeoData.
         * @param  ecomSeoData  CatalogEcomSeoData value for ecomSeoData.
         * @return Builder
         */
        public Builder ecomSeoData(CatalogEcomSeoData ecomSeoData) {
            this.ecomSeoData = ecomSeoData;
            return this;
        }

        /**
         * Setter for foodAndBeverageDetails.
         * @param  foodAndBeverageDetails  CatalogItemFoodAndBeverageDetails value for
         *         foodAndBeverageDetails.
         * @return Builder
         */
        public Builder foodAndBeverageDetails(CatalogItemFoodAndBeverageDetails foodAndBeverageDetails) {
            this.foodAndBeverageDetails = foodAndBeverageDetails;
            return this;
        }

        /**
         * Setter for reportingCategory.
         * @param  reportingCategory  CatalogObjectCategory value for reportingCategory.
         * @return Builder
         */
        public Builder reportingCategory(CatalogObjectCategory reportingCategory) {
            this.reportingCategory = reportingCategory;
            return this;
        }

        /**
         * Builds a new {@link CatalogItem} object using the set fields.
         * @return {@link CatalogItem}
         */
        public CatalogItem build() {
            return new CatalogItem(
                    name,
                    description,
                    abbreviation,
                    labelColor,
                    isTaxable,
                    availableOnline,
                    availableForPickup,
                    availableElectronically,
                    categoryId,
                    taxIds,
                    modifierListInfo,
                    variations,
                    productType,
                    skipModifierScreen,
                    itemOptions,
                    imageIds,
                    sortName,
                    categories,
                    descriptionHtml,
                    descriptionPlaintext,
                    channels,
                    isArchived,
                    ecomSeoData,
                    foodAndBeverageDetails,
                    reportingCategory);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy