io.alauda.kubernetes.api.model.DoneableService Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.Function;
public class DoneableService extends ServiceFluentImpl implements Doneable{
private final ServiceBuilder builder;
private final io.alauda.kubernetes.api.builder.Function function;
public DoneableService(io.alauda.kubernetes.api.builder.Function function){
super();this.builder=new ServiceBuilder(this);this.function=function;
}
public DoneableService(Service item,io.alauda.kubernetes.api.builder.Function function){
super(item);this.builder=new ServiceBuilder(this, item);this.function=function;
}
public DoneableService(Service item){
super(item);this.builder=new ServiceBuilder(this, item);this.function=new Function() {
public Service apply(Service item) {
return item;
}
}
;
}
public Service done(){
return function.apply(builder.build());
}
}