annotations.io.alauda.kubernetes.api.model.extensions.DoneableNetworkPolicySpec Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model.extensions;
import io.alauda.kubernetes.api.builder.Function;
import io.alauda.kubernetes.api.model.Doneable;
public class DoneableNetworkPolicySpec extends NetworkPolicySpecFluentImpl implements Doneable{
private final NetworkPolicySpecBuilder builder;
private final io.alauda.kubernetes.api.builder.Function function;
public DoneableNetworkPolicySpec(io.alauda.kubernetes.api.builder.Function function){
super();this.builder=new NetworkPolicySpecBuilder(this);this.function=function;
}
public DoneableNetworkPolicySpec(NetworkPolicySpec item,io.alauda.kubernetes.api.builder.Function function){
super(item);this.builder=new NetworkPolicySpecBuilder(this, item);this.function=function;
}
public DoneableNetworkPolicySpec(NetworkPolicySpec item){
super(item);this.builder=new NetworkPolicySpecBuilder(this, item);this.function=new Function() {
public NetworkPolicySpec apply(NetworkPolicySpec item) {
return item;
}
}
;
}
public NetworkPolicySpec done(){
return function.apply(builder.build());
}
}