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

io.sphere.sdk.reviews.ReviewDraftDsl Maven / Gradle / Ivy

There is a newer version: 2.16.0
Show newest version
/*
This class has been generated by class io.sphere.sdk.annotations.processors.ResourceDraftValueAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.ResourceDraftValue.
in the source class io.sphere.sdk.reviews.ReviewDraft.

*/
package io.sphere.sdk.reviews;

import javax.annotation.Nullable;
import io.sphere.sdk.models.*;
import java.util.*;
import io.sphere.sdk.utils.*;
import com.fasterxml.jackson.annotation.*;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.reviews.ReviewDraftBuilder;


public final class ReviewDraftDsl extends io.sphere.sdk.models.Base implements ReviewDraft {
    @Nullable()
    private     final java.lang.String authorName;
    @Nullable()
    private     final io.sphere.sdk.types.CustomFieldsDraft custom;
    @Nullable()
    private     final io.sphere.sdk.models.ResourceIdentifier customer;
    @Nullable()
    private     final java.lang.String key;
    @Nullable()
    private     final java.util.Locale locale;
    @Nullable()
    private     final java.lang.Integer rating;
    @Nullable()
    private     final io.sphere.sdk.models.ResourceIdentifier state;
    @Nullable()
    private     final io.sphere.sdk.models.ResourceIdentifier target;
    @Nullable()
    private     final java.lang.String text;
    @Nullable()
    private     final java.lang.String title;
    @Nullable()
    private     final java.lang.String uniquenessValue;

    @JsonCreator()
    ReviewDraftDsl(final java.lang.String authorName, final io.sphere.sdk.types.CustomFieldsDraft custom, final io.sphere.sdk.models.ResourceIdentifier customer, final java.lang.String key, final java.util.Locale locale, final java.lang.Integer rating, final io.sphere.sdk.models.ResourceIdentifier state, final io.sphere.sdk.models.ResourceIdentifier target, final java.lang.String text, final java.lang.String title, final java.lang.String uniquenessValue) {
        
        this.authorName = authorName;
        this.custom = custom;
        this.customer = customer;
        this.key = key;
        this.locale = locale;
        this.rating = rating;
        this.state = state;
        this.target = target;
        this.text = text;
        this.title = title;
        this.uniquenessValue = uniquenessValue;
        
}
    
    
    @Nullable()
    public java.lang.String getAuthorName() {
        return authorName;
}
    
    @Nullable()
    public io.sphere.sdk.types.CustomFieldsDraft getCustom() {
        return custom;
}
    
    @Nullable()
    public io.sphere.sdk.models.ResourceIdentifier getCustomer() {
        return customer;
}
    
    @Nullable()
    public java.lang.String getKey() {
        return key;
}
    
    @Nullable()
    public java.util.Locale getLocale() {
        return locale;
}
    
    @Nullable()
    public java.lang.Integer getRating() {
        return rating;
}
    
    @Nullable()
    public io.sphere.sdk.models.ResourceIdentifier getState() {
        return state;
}
    
    @Nullable()
    public io.sphere.sdk.models.ResourceIdentifier getTarget() {
        return target;
}
    
    @Nullable()
    public java.lang.String getText() {
        return text;
}
    
    @Nullable()
    public java.lang.String getTitle() {
        return title;
}
    
    @Nullable()
    public java.lang.String getUniquenessValue() {
        return uniquenessValue;
}
    
    public ReviewDraftDsl withAuthorName(@Nullable() final java.lang.String authorName) {
        return newBuilder().authorName(authorName).build();
}
    
    public ReviewDraftDsl withCustom(@Nullable() final io.sphere.sdk.types.CustomFieldsDraft custom) {
        return newBuilder().custom(custom).build();
}
    
    public ReviewDraftDsl withCustomer(@Nullable() final io.sphere.sdk.models.ResourceIdentifier customer) {
        return newBuilder().customer(customer).build();
}
    
    public ReviewDraftDsl withKey(@Nullable() final java.lang.String key) {
        return newBuilder().key(key).build();
}
    
    public ReviewDraftDsl withLocale(@Nullable() final java.util.Locale locale) {
        return newBuilder().locale(locale).build();
}
    
    public ReviewDraftDsl withRating(@Nullable() final java.lang.Integer rating) {
        return newBuilder().rating(rating).build();
}
    
    public ReviewDraftDsl withState(@Nullable() final io.sphere.sdk.models.ResourceIdentifier state) {
        return newBuilder().state(state).build();
}
    
    public ReviewDraftDsl withTarget(@Nullable() final io.sphere.sdk.models.ResourceIdentifier target) {
        return newBuilder().target(target).build();
}
    
    public ReviewDraftDsl withText(@Nullable() final java.lang.String text) {
        return newBuilder().text(text).build();
}
    
    public ReviewDraftDsl withTitle(@Nullable() final java.lang.String title) {
        return newBuilder().title(title).build();
}
    
    public ReviewDraftDsl withUniquenessValue(@Nullable() final java.lang.String uniquenessValue) {
        return newBuilder().uniquenessValue(uniquenessValue).build();
}
    
    private ReviewDraftBuilder newBuilder() {
        return new ReviewDraftBuilder(authorName, custom, customer, key, locale, rating, state, target, text, title, uniquenessValue);
}
    
    public static ReviewDraftDsl ofTitle(final java.lang.String title) {
        return new ReviewDraftDsl(null, null, null, null, null, null, null, null, null, title, null);
}
    
    public static ReviewDraftDsl ofText(final java.lang.String text) {
        return new ReviewDraftDsl(null, null, null, null, null, null, null, null, text, null, null);
}
    
    public static ReviewDraftDsl ofRating(final java.lang.Integer rating) {
        return new ReviewDraftDsl(null, null, null, null, null, rating, null, null, null, null, null);
}
    
    public static ReviewDraftDsl of(final ReviewDraft template) {
        return new ReviewDraftDsl(template.getAuthorName(), template.getCustom(), template.getCustomer(), template.getKey(), template.getLocale(), template.getRating(), template.getState(), template.getTarget(), template.getText(), template.getTitle(), template.getUniquenessValue());
}
    
    
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy