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

io.sphere.sdk.channels.ChannelImpl Maven / Gradle / Ivy

package io.sphere.sdk.channels;

import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.models.LocalizedString;
import io.sphere.sdk.models.ResourceImpl;
import io.sphere.sdk.reviews.ReviewRatingStatistics;

import javax.annotation.Nullable;
import java.time.ZonedDateTime;
import java.util.Set;

class ChannelImpl extends ResourceImpl implements Channel {
    private final String key;
    private final Set roles;
    @Nullable
    private final LocalizedString name;
    @Nullable
    private final LocalizedString description;
    @Nullable
    private final ReviewRatingStatistics reviewRatingStatistics;

    @JsonCreator
    ChannelImpl(final String id, final Long version, final ZonedDateTime createdAt, final ZonedDateTime lastModifiedAt,
                final String key, final Set roles, final LocalizedString name,
                final LocalizedString description, final ReviewRatingStatistics reviewRatingStatistics) {
        super(id, version, createdAt, lastModifiedAt);
        this.key = key;
        this.roles = roles;
        this.name = name;
        this.description = description;
        this.reviewRatingStatistics = reviewRatingStatistics;
    }

    public String getKey() {
        return key;
    }

    public Set getRoles() {
        return roles;
    }

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

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

    @Override
    @Nullable
    public ReviewRatingStatistics getReviewRatingStatistics() {
        return reviewRatingStatistics;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy