All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
io.alauda.kubernetes.api.model.PodSpecBuilder Maven / Gradle / Ivy
package io.alauda.kubernetes.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class PodSpecBuilder extends PodSpecFluentImpl implements VisitableBuilder{
PodSpecFluent> fluent;
Boolean validationEnabled;
public PodSpecBuilder(){
this(true);
}
public PodSpecBuilder(Boolean validationEnabled){
this(new PodSpec(), validationEnabled);
}
public PodSpecBuilder(PodSpecFluent> fluent){
this(fluent, true);
}
public PodSpecBuilder(PodSpecFluent> fluent,Boolean validationEnabled){
this(fluent, new PodSpec(), validationEnabled);
}
public PodSpecBuilder(PodSpecFluent> fluent,PodSpec instance){
this(fluent, instance, true);
}
public PodSpecBuilder(PodSpecFluent> fluent,PodSpec instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds());
fluent.withAffinity(instance.getAffinity());
fluent.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken());
fluent.withContainers(instance.getContainers());
fluent.withDnsPolicy(instance.getDnsPolicy());
fluent.withHostAliases(instance.getHostAliases());
fluent.withHostIPC(instance.getHostIPC());
fluent.withHostNetwork(instance.getHostNetwork());
fluent.withHostPID(instance.getHostPID());
fluent.withHostname(instance.getHostname());
fluent.withImagePullSecrets(instance.getImagePullSecrets());
fluent.withInitContainers(instance.getInitContainers());
fluent.withNodeName(instance.getNodeName());
fluent.withNodeSelector(instance.getNodeSelector());
fluent.withRestartPolicy(instance.getRestartPolicy());
fluent.withSchedulerName(instance.getSchedulerName());
fluent.withSecurityContext(instance.getSecurityContext());
fluent.withServiceAccount(instance.getServiceAccount());
fluent.withServiceAccountName(instance.getServiceAccountName());
fluent.withSubdomain(instance.getSubdomain());
fluent.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds());
fluent.withTolerations(instance.getTolerations());
fluent.withVolumes(instance.getVolumes());
this.validationEnabled = validationEnabled;
}
public PodSpecBuilder(PodSpec instance){
this(instance,true);
}
public PodSpecBuilder(PodSpec instance,Boolean validationEnabled){
this.fluent = this;
this.withActiveDeadlineSeconds(instance.getActiveDeadlineSeconds());
this.withAffinity(instance.getAffinity());
this.withAutomountServiceAccountToken(instance.getAutomountServiceAccountToken());
this.withContainers(instance.getContainers());
this.withDnsPolicy(instance.getDnsPolicy());
this.withHostAliases(instance.getHostAliases());
this.withHostIPC(instance.getHostIPC());
this.withHostNetwork(instance.getHostNetwork());
this.withHostPID(instance.getHostPID());
this.withHostname(instance.getHostname());
this.withImagePullSecrets(instance.getImagePullSecrets());
this.withInitContainers(instance.getInitContainers());
this.withNodeName(instance.getNodeName());
this.withNodeSelector(instance.getNodeSelector());
this.withRestartPolicy(instance.getRestartPolicy());
this.withSchedulerName(instance.getSchedulerName());
this.withSecurityContext(instance.getSecurityContext());
this.withServiceAccount(instance.getServiceAccount());
this.withServiceAccountName(instance.getServiceAccountName());
this.withSubdomain(instance.getSubdomain());
this.withTerminationGracePeriodSeconds(instance.getTerminationGracePeriodSeconds());
this.withTolerations(instance.getTolerations());
this.withVolumes(instance.getVolumes());
this.validationEnabled = validationEnabled;
}
public PodSpec build(){
PodSpec buildable = new PodSpec(fluent.getActiveDeadlineSeconds(),fluent.getAffinity(),fluent.isAutomountServiceAccountToken(),fluent.getContainers(),fluent.getDnsPolicy(),fluent.getHostAliases(),fluent.isHostIPC(),fluent.isHostNetwork(),fluent.isHostPID(),fluent.getHostname(),fluent.getImagePullSecrets(),fluent.getInitContainers(),fluent.getNodeName(),fluent.getNodeSelector(),fluent.getRestartPolicy(),fluent.getSchedulerName(),fluent.getSecurityContext(),fluent.getServiceAccount(),fluent.getServiceAccountName(),fluent.getSubdomain(),fluent.getTerminationGracePeriodSeconds(),fluent.getTolerations(),fluent.getVolumes());
io.alauda.kubernetes.api.builder.ValidationUtils.validate(buildable);
return buildable;
}
public boolean equals(Object o){
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
PodSpecBuilder that = (PodSpecBuilder) o;
if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
return true;
}
}