io.fabric8.knative.eventing.v1.BrokerSpecFluentImpl Maven / Gradle / Ivy
package io.fabric8.knative.eventing.v1;
import java.lang.SuppressWarnings;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecFluentImpl;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReference;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder;
import java.lang.Deprecated;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec;
import io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceFluentImpl;
/**
* Generated
*/
@SuppressWarnings(value = "unchecked")
public class BrokerSpecFluentImpl> extends BaseFluent implements BrokerSpecFluent{
public BrokerSpecFluentImpl() {
}
public BrokerSpecFluentImpl(io.fabric8.knative.eventing.v1.BrokerSpec instance) {
this.withConfig(instance.getConfig());
this.withDelivery(instance.getDelivery());
}
private KReferenceBuilder config;
private DeliverySpecBuilder delivery;
/**
* This method has been deprecated, please use method buildConfig instead.
* @return The buildable object.
*/
@Deprecated
public io.fabric8.knative.internal.pkg.apis.duck.v1.KReference getConfig() {
return this.config!=null ?this.config.build():null;
}
public io.fabric8.knative.internal.pkg.apis.duck.v1.KReference buildConfig() {
return this.config!=null ?this.config.build():null;
}
public A withConfig(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference config) {
_visitables.get("config").remove(this.config);
if (config!=null){ this.config= new KReferenceBuilder(config); _visitables.get("config").add(this.config);} return (A) this;
}
public Boolean hasConfig() {
return this.config != null;
}
public A withNewConfig(String apiVersion,java.lang.String kind,java.lang.String name,java.lang.String namespace) {
return (A)withConfig(new KReference(apiVersion, kind, name, namespace));
}
public BrokerSpecFluent.ConfigNested withNewConfig() {
return new BrokerSpecFluentImpl.ConfigNestedImpl();
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.ConfigNested withNewConfigLike(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference item) {
return new BrokerSpecFluentImpl.ConfigNestedImpl(item);
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.ConfigNested editConfig() {
return withNewConfigLike(getConfig());
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.ConfigNested editOrNewConfig() {
return withNewConfigLike(getConfig() != null ? getConfig(): new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder().build());
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.ConfigNested editOrNewConfigLike(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference item) {
return withNewConfigLike(getConfig() != null ? getConfig(): item);
}
/**
* This method has been deprecated, please use method buildDelivery instead.
* @return The buildable object.
*/
@java.lang.Deprecated
public DeliverySpec getDelivery() {
return this.delivery!=null ?this.delivery.build():null;
}
public io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec buildDelivery() {
return this.delivery!=null ?this.delivery.build():null;
}
public A withDelivery(io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec delivery) {
_visitables.get("delivery").remove(this.delivery);
if (delivery!=null){ this.delivery= new io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder(delivery); _visitables.get("delivery").add(this.delivery);} return (A) this;
}
public java.lang.Boolean hasDelivery() {
return this.delivery != null;
}
public BrokerSpecFluent.DeliveryNested withNewDelivery() {
return new BrokerSpecFluentImpl.DeliveryNestedImpl();
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.DeliveryNested withNewDeliveryLike(io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec item) {
return new io.fabric8.knative.eventing.v1.BrokerSpecFluentImpl.DeliveryNestedImpl(item);
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.DeliveryNested editDelivery() {
return withNewDeliveryLike(getDelivery());
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.DeliveryNested editOrNewDelivery() {
return withNewDeliveryLike(getDelivery() != null ? getDelivery(): new io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder().build());
}
public io.fabric8.knative.eventing.v1.BrokerSpecFluent.DeliveryNested editOrNewDeliveryLike(io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec item) {
return withNewDeliveryLike(getDelivery() != null ? getDelivery(): item);
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
BrokerSpecFluentImpl that = (BrokerSpecFluentImpl) o;
if (config != null ? !config.equals(that.config) :that.config != null) return false;
if (delivery != null ? !delivery.equals(that.delivery) :that.delivery != null) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(config, delivery, super.hashCode());
}
public java.lang.String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (config != null) { sb.append("config:"); sb.append(config + ","); }
if (delivery != null) { sb.append("delivery:"); sb.append(delivery); }
sb.append("}");
return sb.toString();
}
class ConfigNestedImpl extends KReferenceFluentImpl> implements io.fabric8.knative.eventing.v1.BrokerSpecFluent.ConfigNested,Nested{
ConfigNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.KReference item) {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder(this, item);
}
ConfigNestedImpl() {
this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder(this);
}
io.fabric8.knative.internal.pkg.apis.duck.v1.KReferenceBuilder builder;
public N and() {
return (N) BrokerSpecFluentImpl.this.withConfig(builder.build());
}
public N endConfig() {
return and();
}
}
class DeliveryNestedImpl extends DeliverySpecFluentImpl> implements io.fabric8.knative.eventing.v1.BrokerSpecFluent.DeliveryNested,io.fabric8.kubernetes.api.builder.Nested{
DeliveryNestedImpl(io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpec item) {
this.builder = new io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder(this, item);
}
DeliveryNestedImpl() {
this.builder = new io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder(this);
}
io.fabric8.knative.internal.eventing.pkg.apis.duck.v1.DeliverySpecBuilder builder;
public N and() {
return (N) BrokerSpecFluentImpl.this.withDelivery(builder.build());
}
public N endDelivery() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy