io.dekorate.servicebinding.model.ApplicationFluentImpl Maven / Gradle / Ivy
package io.dekorate.servicebinding.model;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class ApplicationFluentImpl> extends BaseFluent implements ApplicationFluent{
public ApplicationFluentImpl() {
}
public ApplicationFluentImpl(Application instance) {
this.withResource(instance.getResource());
this.withKind(instance.getKind());
this.withGroup(instance.getGroup());
this.withVersion(instance.getVersion());
this.withName(instance.getName());
this.withBindingPath(instance.getBindingPath());
}
private String resource;
private String kind;
private String group;
private String version;
private String name;
private BindingPathBuilder bindingPath;
public String getResource() {
return this.resource;
}
public A withResource(String resource) {
this.resource=resource; return (A) this;
}
public Boolean hasResource() {
return this.resource != null;
}
public String getKind() {
return this.kind;
}
public A withKind(String kind) {
this.kind=kind; return (A) this;
}
public Boolean hasKind() {
return this.kind != null;
}
public String getGroup() {
return this.group;
}
public A withGroup(String group) {
this.group=group; return (A) this;
}
public Boolean hasGroup() {
return this.group != null;
}
public String getVersion() {
return this.version;
}
public A withVersion(String version) {
this.version=version; return (A) this;
}
public Boolean hasVersion() {
return this.version != null;
}
public String getName() {
return this.name;
}
public A withName(String name) {
this.name=name; return (A) this;
}
public Boolean hasName() {
return this.name != null;
}
/**
* This method has been deprecated, please use method buildBindingPath instead.
* @return The buildable object.
*/
@Deprecated
public BindingPath getBindingPath() {
return this.bindingPath!=null ?this.bindingPath.build():null;
}
public BindingPath buildBindingPath() {
return this.bindingPath!=null ?this.bindingPath.build():null;
}
public A withBindingPath(BindingPath bindingPath) {
_visitables.get("bindingPath").remove(this.bindingPath);
if (bindingPath!=null){ this.bindingPath= new BindingPathBuilder(bindingPath); _visitables.get("bindingPath").add(this.bindingPath);} else { this.bindingPath = null; _visitables.get("bindingPath").remove(this.bindingPath); } return (A) this;
}
public Boolean hasBindingPath() {
return this.bindingPath != null;
}
public A withNewBindingPath(String containerPath,String secretPath) {
return (A)withBindingPath(new BindingPath(containerPath, secretPath));
}
public ApplicationFluent.BindingPathNested withNewBindingPath() {
return new ApplicationFluentImpl.BindingPathNestedImpl();
}
public ApplicationFluent.BindingPathNested withNewBindingPathLike(BindingPath item) {
return new ApplicationFluentImpl.BindingPathNestedImpl(item);
}
public ApplicationFluent.BindingPathNested editBindingPath() {
return withNewBindingPathLike(getBindingPath());
}
public ApplicationFluent.BindingPathNested editOrNewBindingPath() {
return withNewBindingPathLike(getBindingPath() != null ? getBindingPath(): new BindingPathBuilder().build());
}
public ApplicationFluent.BindingPathNested editOrNewBindingPathLike(BindingPath item) {
return withNewBindingPathLike(getBindingPath() != null ? getBindingPath(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ApplicationFluentImpl that = (ApplicationFluentImpl) o;
if (resource != null ? !resource.equals(that.resource) :that.resource != null) return false;
if (kind != null ? !kind.equals(that.kind) :that.kind != null) return false;
if (group != null ? !group.equals(that.group) :that.group != null) return false;
if (version != null ? !version.equals(that.version) :that.version != null) return false;
if (name != null ? !name.equals(that.name) :that.name != null) return false;
if (bindingPath != null ? !bindingPath.equals(that.bindingPath) :that.bindingPath != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(resource, kind, group, version, name, bindingPath, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (resource != null) { sb.append("resource:"); sb.append(resource + ","); }
if (kind != null) { sb.append("kind:"); sb.append(kind + ","); }
if (group != null) { sb.append("group:"); sb.append(group + ","); }
if (version != null) { sb.append("version:"); sb.append(version + ","); }
if (name != null) { sb.append("name:"); sb.append(name + ","); }
if (bindingPath != null) { sb.append("bindingPath:"); sb.append(bindingPath); }
sb.append("}");
return sb.toString();
}
class BindingPathNestedImpl extends BindingPathFluentImpl> implements ApplicationFluent.BindingPathNested,Nested{
BindingPathNestedImpl(BindingPath item) {
this.builder = new BindingPathBuilder(this, item);
}
BindingPathNestedImpl() {
this.builder = new BindingPathBuilder(this);
}
BindingPathBuilder builder;
public N and() {
return (N) ApplicationFluentImpl.this.withBindingPath(builder.build());
}
public N endBindingPath() {
return and();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy