io.sphere.sdk.channels.ChannelDraftBuilder Maven / Gradle / Ivy
/*
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.channels.ChannelDraft.
*/
package io.sphere.sdk.channels;
import javax.annotation.Nullable;
import io.sphere.sdk.models.*;
import java.util.*;
import io.sphere.sdk.utils.*;
import com.fasterxml.jackson.annotation.*;
import io.sphere.sdk.models.Builder;
import com.fasterxml.jackson.annotation.JsonCreator;
/** Builder for {@link ChannelDraft}. */
public final class ChannelDraftBuilder extends io.sphere.sdk.models.Base implements Builder {
private java.lang.String key;
@Nullable()
private java.util.Set roles;
@Nullable()
private io.sphere.sdk.models.LocalizedString name;
@Nullable()
private io.sphere.sdk.models.LocalizedString description;
@Nullable()
private io.sphere.sdk.types.CustomFieldsDraft custom;
@Nullable()
private io.sphere.sdk.models.Address address;
@JsonCreator()
ChannelDraftBuilder(final io.sphere.sdk.models.Address address, final io.sphere.sdk.types.CustomFieldsDraft custom, final io.sphere.sdk.models.LocalizedString description, final java.lang.String key, final io.sphere.sdk.models.LocalizedString name, final java.util.Set roles) {
this.address = address;
this.custom = custom;
this.description = description;
this.key = key;
this.name = name;
this.roles = roles;
}
public ChannelDraftBuilder key(final java.lang.String key) {
this.key = key;
return this;
}
public ChannelDraftBuilder roles(@Nullable() final java.util.Set roles) {
this.roles = roles;
return this;
}
public ChannelDraftBuilder name(@Nullable() final io.sphere.sdk.models.LocalizedString name) {
this.name = name;
return this;
}
public ChannelDraftBuilder description(@Nullable() final io.sphere.sdk.models.LocalizedString description) {
this.description = description;
return this;
}
public ChannelDraftBuilder custom(@Nullable() final io.sphere.sdk.types.CustomFieldsDraft custom) {
this.custom = custom;
return this;
}
public ChannelDraftBuilder address(@Nullable() final io.sphere.sdk.models.Address address) {
this.address = address;
return this;
}
public ChannelDraftDsl build() {
return new ChannelDraftDsl(address, custom, description, key, name, roles);
}
public static ChannelDraftBuilder of(final java.lang.String key) {
return new ChannelDraftBuilder(null, null, null, key, null, null);
}
public static ChannelDraftBuilder of(final ChannelDraft template) {
return new ChannelDraftBuilder(template.getAddress(), template.getCustom(), template.getDescription(), template.getKey(), template.getName(), template.getRoles());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy