io.alauda.devops.api.model.ImageStreamStatusBuilder Maven / Gradle / Ivy
package io.alauda.devops.api.model;
import io.alauda.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class ImageStreamStatusBuilder extends ImageStreamStatusFluentImpl implements VisitableBuilder{
ImageStreamStatusFluent> fluent;
Boolean validationEnabled;
public ImageStreamStatusBuilder(){
this(true);
}
public ImageStreamStatusBuilder(Boolean validationEnabled){
this(new ImageStreamStatus(), validationEnabled);
}
public ImageStreamStatusBuilder(ImageStreamStatusFluent> fluent){
this(fluent, true);
}
public ImageStreamStatusBuilder(ImageStreamStatusFluent> fluent,Boolean validationEnabled){
this(fluent, new ImageStreamStatus(), validationEnabled);
}
public ImageStreamStatusBuilder(ImageStreamStatusFluent> fluent,ImageStreamStatus instance){
this(fluent, instance, true);
}
public ImageStreamStatusBuilder(ImageStreamStatusFluent> fluent,ImageStreamStatus instance,Boolean validationEnabled){
this.fluent = fluent;
fluent.withDockerImageRepository(instance.getDockerImageRepository());
fluent.withPublicDockerImageRepository(instance.getPublicDockerImageRepository());
fluent.withTags(instance.getTags());
this.validationEnabled = validationEnabled;
}
public ImageStreamStatusBuilder(ImageStreamStatus instance){
this(instance,true);
}
public ImageStreamStatusBuilder(ImageStreamStatus instance,Boolean validationEnabled){
this.fluent = this;
this.withDockerImageRepository(instance.getDockerImageRepository());
this.withPublicDockerImageRepository(instance.getPublicDockerImageRepository());
this.withTags(instance.getTags());
this.validationEnabled = validationEnabled;
}
public ImageStreamStatus build(){
ImageStreamStatus buildable = new ImageStreamStatus(fluent.getDockerImageRepository(),fluent.getPublicDockerImageRepository(),fluent.getTags());
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;
ImageStreamStatusBuilder that = (ImageStreamStatusBuilder) 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;
}
}