io.sphere.sdk.commands.MetaModelUpdateCommandDslBuilder Maven / Gradle / Ivy
package io.sphere.sdk.commands;
import com.fasterxml.jackson.core.type.TypeReference;
import io.sphere.sdk.expansion.ExpansionPath;
import io.sphere.sdk.models.*;
import java.util.List;
import java.util.function.Function;
import static java.util.Objects.requireNonNull;
/**
* Internal class.
*/
public class MetaModelUpdateCommandDslBuilder, C extends UpdateCommandDsl, E> extends Base implements Builder{
Versioned versioned;
List extends UpdateAction> updateActions;
TypeReference typeReference;
String baseEndpointWithoutId;
Function, C> creationFunction;
final E expansionModel;
List> expansionPaths;
MetaModelUpdateCommandDslBuilder(final MetaModelUpdateCommandDslImpl template) {
this.expansionModel = requireNonNull(template.expansionModel);
this.expansionPaths = requireNonNull(template.expansionPaths);
this.creationFunction = requireNonNull(template.creationFunction);
this.versioned = requireNonNull(template.versioned);
this.updateActions = requireNonNull(template.updateActions);
this.typeReference = requireNonNull(template.typeReference);
this.baseEndpointWithoutId = requireNonNull(template.baseEndpointWithoutId);
}
public MetaModelUpdateCommandDslBuilder versioned(final Versioned versioned) {
this.versioned = versioned;
return this;
}
@Override
public C build() {
return creationFunction.apply(this);
}
String getBaseEndpointWithoutId() {
return baseEndpointWithoutId;
}
Function, C> getCreationFunction() {
return creationFunction;
}
TypeReference getTypeReference() {
return typeReference;
}
List extends UpdateAction> getUpdateActions() {
return updateActions;
}
Versioned getVersioned() {
return versioned;
}
MetaModelUpdateCommandDslBuilder expansionPaths(final List> expansionPaths) {
this.expansionPaths = expansionPaths;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy