io.strimzi.api.kafka.model.template.KafkaUserTemplateFluentImpl Maven / Gradle / Ivy
package io.strimzi.api.kafka.model.template;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
/**
* Representation of a template for a KafkaUser resource.
*/
public class KafkaUserTemplateFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent {
private io.strimzi.api.kafka.model.template.ResourceTemplateBuilder secret;
public KafkaUserTemplateFluentImpl() {
}
public KafkaUserTemplateFluentImpl(io.strimzi.api.kafka.model.template.KafkaUserTemplate instance) {
this.withSecret(instance.getSecret());
}
@java.lang.Deprecated
/**
* This method has been deprecated, please use method buildSecret instead.
* @return The buildable object.
*/
public io.strimzi.api.kafka.model.template.ResourceTemplate getSecret() {
return this.secret!=null?this.secret.build():null;
}
public io.strimzi.api.kafka.model.template.ResourceTemplate buildSecret() {
return this.secret!=null?this.secret.build():null;
}
public A withSecret(io.strimzi.api.kafka.model.template.ResourceTemplate secret) {
_visitables.get("secret").remove(this.secret);
if (secret!=null){ this.secret= new io.strimzi.api.kafka.model.template.ResourceTemplateBuilder(secret); _visitables.get("secret").add(this.secret);} return (A) this;
}
public java.lang.Boolean hasSecret() {
return this.secret != null;
}
public io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent.SecretNested withNewSecret() {
return new io.strimzi.api.kafka.model.template.KafkaUserTemplateFluentImpl.SecretNestedImpl();
}
public io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent.SecretNested withNewSecretLike(io.strimzi.api.kafka.model.template.ResourceTemplate item) {
return new io.strimzi.api.kafka.model.template.KafkaUserTemplateFluentImpl.SecretNestedImpl(item);
}
public io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent.SecretNested editSecret() {
return withNewSecretLike(getSecret());
}
public io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent.SecretNested editOrNewSecret() {
return withNewSecretLike(getSecret() != null ? getSecret(): new io.strimzi.api.kafka.model.template.ResourceTemplateBuilder().build());
}
public io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent.SecretNested editOrNewSecretLike(io.strimzi.api.kafka.model.template.ResourceTemplate item) {
return withNewSecretLike(getSecret() != null ? getSecret(): item);
}
public boolean equals(java.lang.Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
KafkaUserTemplateFluentImpl that = (KafkaUserTemplateFluentImpl) o;
if (secret != null ? !secret.equals(that.secret) :that.secret != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(secret, super.hashCode());
}
/**
* Representation of a template for Strimzi resources.
*/
public class SecretNestedImpl extends io.strimzi.api.kafka.model.template.ResourceTemplateFluentImpl> implements io.strimzi.api.kafka.model.template.KafkaUserTemplateFluent.SecretNested,io.fabric8.kubernetes.api.builder.Nested {
private final io.strimzi.api.kafka.model.template.ResourceTemplateBuilder builder;
SecretNestedImpl(io.strimzi.api.kafka.model.template.ResourceTemplate item) {
this.builder = new io.strimzi.api.kafka.model.template.ResourceTemplateBuilder(this, item);
}
SecretNestedImpl() {
this.builder = new io.strimzi.api.kafka.model.template.ResourceTemplateBuilder(this);
}
public N and() {
return (N) KafkaUserTemplateFluentImpl.this.withSecret(builder.build());
}
public N endSecret() {
return and();
}
}
}