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

io.sphere.sdk.channels.ChannelDraftDsl 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.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 com.fasterxml.jackson.annotation.JsonCreator;
import io.sphere.sdk.channels.ChannelDraftBuilder;


public final class ChannelDraftDsl extends io.sphere.sdk.models.Base implements ChannelDraft {
    private     final java.lang.String key;
    @Nullable()
    private     final java.util.Set roles;
    @Nullable()
    private     final io.sphere.sdk.models.LocalizedString name;
    @Nullable()
    private     final io.sphere.sdk.models.LocalizedString description;
    @Nullable()
    private     final io.sphere.sdk.types.CustomFieldsDraft custom;
    @Nullable()
    private     final io.sphere.sdk.models.Address address;
    @Nullable()
    private     final io.sphere.sdk.models.GeoJSON geoLocation;

    @JsonCreator()
    ChannelDraftDsl(final io.sphere.sdk.models.Address address, final io.sphere.sdk.types.CustomFieldsDraft custom, final io.sphere.sdk.models.LocalizedString description, final io.sphere.sdk.models.GeoJSON geoLocation, 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.geoLocation = geoLocation;
        this.key = key;
        this.name = name;
        this.roles = roles;
        
}
    
    
    @Nullable()
    public io.sphere.sdk.models.Address getAddress() {
        return address;
}
    
    @Nullable()
    public io.sphere.sdk.types.CustomFieldsDraft getCustom() {
        return custom;
}
    
    @Nullable()
    public io.sphere.sdk.models.LocalizedString getDescription() {
        return description;
}
    
    @Nullable()
    public io.sphere.sdk.models.GeoJSON getGeoLocation() {
        return geoLocation;
}
    
    public java.lang.String getKey() {
        return key;
}
    
    @Nullable()
    public io.sphere.sdk.models.LocalizedString getName() {
        return name;
}
    
    @Nullable()
    public java.util.Set getRoles() {
        return roles;
}
    
    public ChannelDraftDsl withKey(final java.lang.String key) {
        return newBuilder().key(key).build();
}
    
    public ChannelDraftDsl withRoles(@Nullable() final java.util.Set roles) {
        return newBuilder().roles(roles).build();
}
    
    public ChannelDraftDsl withName(@Nullable() final io.sphere.sdk.models.LocalizedString name) {
        return newBuilder().name(name).build();
}
    
    public ChannelDraftDsl withDescription(@Nullable() final io.sphere.sdk.models.LocalizedString description) {
        return newBuilder().description(description).build();
}
    
    public ChannelDraftDsl withCustom(@Nullable() final io.sphere.sdk.types.CustomFieldsDraft custom) {
        return newBuilder().custom(custom).build();
}
    
    public ChannelDraftDsl withAddress(@Nullable() final io.sphere.sdk.models.Address address) {
        return newBuilder().address(address).build();
}
    
    public ChannelDraftDsl withGeoLocation(@Nullable() final io.sphere.sdk.models.GeoJSON geoLocation) {
        return newBuilder().geoLocation(geoLocation).build();
}
    
    private ChannelDraftBuilder newBuilder() {
        return new ChannelDraftBuilder(address, custom, description, geoLocation, key, name, roles);
}
    
    public static ChannelDraftDsl of(final java.lang.String key) {
        return new ChannelDraftDsl(null, null, null, null, key, null, null);
}
    
    public static ChannelDraftDsl of(final ChannelDraft template) {
        return new ChannelDraftDsl(template.getAddress(), template.getCustom(), template.getDescription(), template.getGeoLocation(), template.getKey(), template.getName(), template.getRoles());
}
    
    public ChannelDraftDsl withRoles(final ChannelRole ... roles) {
        return newBuilder().roles(io.sphere.sdk.utils.SphereInternalUtils.asSet(roles)).build();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy