annotations.io.alauda.devops.api.model.DoneablePolicyRule 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 DoneablePolicyRule extends PolicyRuleFluentImpl implements Doneable{
private final PolicyRuleBuilder builder;
private final io.alauda.kubernetes.api.builder.Function function;
public DoneablePolicyRule(io.alauda.kubernetes.api.builder.Function function){
super();this.builder=new PolicyRuleBuilder(this);this.function=function;
}
public DoneablePolicyRule(PolicyRule item,io.alauda.kubernetes.api.builder.Function function){
super(item);this.builder=new PolicyRuleBuilder(this, item);this.function=function;
}
public DoneablePolicyRule(PolicyRule item){
super(item);this.builder=new PolicyRuleBuilder(this, item);this.function=new Function() {
public PolicyRule apply(PolicyRule item) {
return item;
}
}
;
}
public PolicyRule done(){
return function.apply(builder.build());
}
}