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

io.sphere.sdk.products.ProductDraftImpl Maven / Gradle / Ivy

package io.sphere.sdk.products;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.categories.Category;
import io.sphere.sdk.models.*;
import io.sphere.sdk.producttypes.ProductType;
import io.sphere.sdk.search.SearchKeywords;
import io.sphere.sdk.states.State;
import io.sphere.sdk.taxcategories.TaxCategory;

import javax.annotation.Nullable;
import java.util.List;
import java.util.Set;

class ProductDraftImpl extends Base implements ProductDraft {
    private final ResourceIdentifier productType;
    private final LocalizedString name;
    private final LocalizedString slug;
    @Nullable
    private final LocalizedString description;
    private final Set> categories;
    @Nullable
    private final LocalizedString metaTitle;
    @Nullable
    private final LocalizedString metaDescription;
    @Nullable
    private final LocalizedString metaKeywords;
    private final ProductVariantDraft masterVariant;
    private final List variants;
    private final Reference taxCategory;
    private final SearchKeywords searchKeywords;
    @Nullable
    private final Reference state;
    @Nullable
    private final CategoryOrderHints categoryOrderHints;

    @JsonCreator
    ProductDraftImpl(final ResourceIdentifier productType, final LocalizedString name, final LocalizedString slug,
                     final LocalizedString description, final Set> categories,
                     final LocalizedString metaTitle, final LocalizedString metaDescription, final LocalizedString metaKeywords, final ProductVariantDraft masterVariant,
                     final List variants, final Reference taxCategory,
                     final SearchKeywords searchKeywords, final Reference state,
                     final CategoryOrderHints categoryOrderHints) {
        this.name = name;
        this.productType = productType;
        this.slug = slug;
        this.description = description;
        this.categories = categories;
        this.taxCategory = taxCategory;
        this.searchKeywords = searchKeywords;
        this.state = state;
        this.metaTitle = metaTitle;
        this.metaDescription = metaDescription;
        this.metaKeywords = metaKeywords;
        this.masterVariant = masterVariant;
        this.variants = variants;
        this.categoryOrderHints = categoryOrderHints;
    }

    @Override
    public ResourceIdentifier getProductType() {
        return productType;
    }

    @Override
    public LocalizedString getName() {
        return name;
    }

    @Override
    public LocalizedString getSlug() {
        return slug;
    }

    @Override
    @Nullable
    public LocalizedString getDescription() {
        return description;
    }

    @Override
    public Set> getCategories() {
        return categories;
    }

    @Nullable
    @Override
    public LocalizedString getMetaTitle() {
        return metaTitle;
    }

    @Nullable
    @Override
    public LocalizedString getMetaDescription() {
        return metaDescription;
    }

    @Nullable
    @Override
    public LocalizedString getMetaKeywords() {
        return metaKeywords;
    }

    @Override
    public ProductVariantDraft getMasterVariant() {
        return masterVariant;
    }

    @Override
    public List getVariants() {
        return variants;
    }

    @Nullable
    @Override
    public Reference getTaxCategory() {
        return taxCategory;
    }

    @Override
    public SearchKeywords getSearchKeywords() {
        return searchKeywords;
    }

    @Override
    @Nullable
    public Reference getState() {
        return state;
    }

    @Override
    @Nullable
    public CategoryOrderHints getCategoryOrderHints() {
        return categoryOrderHints;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy