annotations.io.alauda.devops.api.model.DoneablePolicy Maven / Gradle / Ivy
package io.alauda.devops.api.model;
import io.alauda.kubernetes.api.builder.Function;
import io.alauda.kubernetes.api.model.Doneable;
public class DoneablePolicy extends PolicyFluentImpl implements Doneable{
private final PolicyBuilder builder;
private final io.alauda.kubernetes.api.builder.Function function;
public DoneablePolicy(io.alauda.kubernetes.api.builder.Function function){
super();this.builder=new PolicyBuilder(this);this.function=function;
}
public DoneablePolicy(Policy item,io.alauda.kubernetes.api.builder.Function function){
super(item);this.builder=new PolicyBuilder(this, item);this.function=function;
}
public DoneablePolicy(Policy item){
super(item);this.builder=new PolicyBuilder(this, item);this.function=new Function() {
public Policy apply(Policy item) {
return item;
}
}
;
}
public Policy done(){
return function.apply(builder.build());
}
}