io.sphere.sdk.states.commands.StateCreateCommandImpl Maven / Gradle / Ivy
/*
This class has been generated by class io.sphere.sdk.annotations.processors.CreateCommandEndpointAnnotationProcessor
induced by the annotation io.sphere.sdk.annotations.HasCreateCommand.
in the source class io.sphere.sdk.states.State.
To render this class the handlebars template 'commands/createCommandImplementation.hbs' has been used.
*/
package io.sphere.sdk.states.commands;
import io.sphere.sdk.commands.MetaModelCreateCommandBuilder;
import io.sphere.sdk.commands.MetaModelCreateCommandImpl;
import io.sphere.sdk.states.State;
import io.sphere.sdk.states.StateDraft;
import io.sphere.sdk.states.expansion.StateExpansionModel;
import io.sphere.sdk.client.JsonEndpoint;
final class StateCreateCommandImpl extends MetaModelCreateCommandImpl> implements StateCreateCommand {
StateCreateCommandImpl(final MetaModelCreateCommandBuilder> builder) {
super(builder);
}
StateCreateCommandImpl(final StateDraft body) {
super(body, JsonEndpoint.of(State.typeReference(), "/states"), StateExpansionModel.of(), StateCreateCommandImpl::new);
}
@Override
public StateCreateCommand withDraft(final StateDraft draft) {
return new StateCreateCommandImpl(copyBuilder().draft(draft));
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy