io.strimzi.api.kafka.model.common.SidecarFluent Maven / Gradle / Ivy
package io.strimzi.api.kafka.model.common;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.String;
import io.fabric8.kubernetes.api.model.ResourceRequirements;
/**
* Generated
*/
@SuppressWarnings("unchecked")
public class SidecarFluent> extends BaseFluent{
public SidecarFluent() {
}
public SidecarFluent(Sidecar instance) {
this.copyInstance(instance);
}
private String image;
private ResourceRequirements resources;
protected void copyInstance(Sidecar instance) {
instance = (instance != null ? instance : new Sidecar());
if (instance != null) {
this.withImage(instance.getImage());
this.withResources(instance.getResources());
}
}
public String getImage() {
return this.image;
}
public A withImage(String image) {
this.image = image;
return (A) this;
}
public boolean hasImage() {
return this.image != null;
}
public ResourceRequirements getResources() {
return this.resources;
}
public A withResources(ResourceRequirements resources) {
this.resources = resources;
return (A) this;
}
public boolean hasResources() {
return this.resources != null;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
SidecarFluent that = (SidecarFluent) o;
if (!java.util.Objects.equals(image, that.image)) return false;
if (!java.util.Objects.equals(resources, that.resources)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(image, resources, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (image != null) { sb.append("image:"); sb.append(image + ","); }
if (resources != null) { sb.append("resources:"); sb.append(resources); }
sb.append("}");
return sb.toString();
}
}