io.fabric8.knative.duck.v1beta1.SubscriberSpecFluent Maven / Gradle / Ivy
package io.fabric8.knative.duck.v1beta1;
import java.lang.SuppressWarnings;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import java.util.LinkedHashMap;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Long;
import java.lang.Object;
import java.util.Map;
/**
* Generated
*/
@SuppressWarnings("unchecked")
public class SubscriberSpecFluent> extends BaseFluent{
public SubscriberSpecFluent() {
}
public SubscriberSpecFluent(SubscriberSpec instance) {
this.copyInstance(instance);
}
private DeliverySpecBuilder delivery;
private Long generation;
private String replyUri;
private String subscriberUri;
private String uid;
private Map additionalProperties;
protected void copyInstance(SubscriberSpec instance) {
instance = (instance != null ? instance : new SubscriberSpec());
if (instance != null) {
this.withDelivery(instance.getDelivery());
this.withGeneration(instance.getGeneration());
this.withReplyUri(instance.getReplyUri());
this.withSubscriberUri(instance.getSubscriberUri());
this.withUid(instance.getUid());
this.withAdditionalProperties(instance.getAdditionalProperties());
}
}
public DeliverySpec buildDelivery() {
return this.delivery != null ? this.delivery.build() : null;
}
public A withDelivery(DeliverySpec delivery) {
this._visitables.remove("delivery");
if (delivery != null) {
this.delivery = new DeliverySpecBuilder(delivery);
this._visitables.get("delivery").add(this.delivery);
} else {
this.delivery = null;
this._visitables.get("delivery").remove(this.delivery);
}
return (A) this;
}
public boolean hasDelivery() {
return this.delivery != null;
}
public DeliveryNested withNewDelivery() {
return new DeliveryNested(null);
}
public DeliveryNested withNewDeliveryLike(DeliverySpec item) {
return new DeliveryNested(item);
}
public DeliveryNested editDelivery() {
return withNewDeliveryLike(java.util.Optional.ofNullable(buildDelivery()).orElse(null));
}
public DeliveryNested editOrNewDelivery() {
return withNewDeliveryLike(java.util.Optional.ofNullable(buildDelivery()).orElse(new DeliverySpecBuilder().build()));
}
public DeliveryNested editOrNewDeliveryLike(DeliverySpec item) {
return withNewDeliveryLike(java.util.Optional.ofNullable(buildDelivery()).orElse(item));
}
public Long getGeneration() {
return this.generation;
}
public A withGeneration(Long generation) {
this.generation = generation;
return (A) this;
}
public boolean hasGeneration() {
return this.generation != null;
}
public String getReplyUri() {
return this.replyUri;
}
public A withReplyUri(String replyUri) {
this.replyUri = replyUri;
return (A) this;
}
public boolean hasReplyUri() {
return this.replyUri != null;
}
public String getSubscriberUri() {
return this.subscriberUri;
}
public A withSubscriberUri(String subscriberUri) {
this.subscriberUri = subscriberUri;
return (A) this;
}
public boolean hasSubscriberUri() {
return this.subscriberUri != null;
}
public String getUid() {
return this.uid;
}
public A withUid(String uid) {
this.uid = uid;
return (A) this;
}
public boolean hasUid() {
return this.uid != null;
}
public A addToAdditionalProperties(String key,Object value) {
if(this.additionalProperties == null && key != null && value != null) { this.additionalProperties = new LinkedHashMap(); }
if(key != null && value != null) {this.additionalProperties.put(key, value);} return (A)this;
}
public A addToAdditionalProperties(Map map) {
if(this.additionalProperties == null && map != null) { this.additionalProperties = new LinkedHashMap(); }
if(map != null) { this.additionalProperties.putAll(map);} return (A)this;
}
public A removeFromAdditionalProperties(String key) {
if(this.additionalProperties == null) { return (A) this; }
if(key != null && this.additionalProperties != null) {this.additionalProperties.remove(key);} return (A)this;
}
public A removeFromAdditionalProperties(Map map) {
if(this.additionalProperties == null) { return (A) this; }
if(map != null) { for(Object key : map.keySet()) {if (this.additionalProperties != null){this.additionalProperties.remove(key);}}} return (A)this;
}
public Map getAdditionalProperties() {
return this.additionalProperties;
}
public A withAdditionalProperties(Map additionalProperties) {
if (additionalProperties == null) {
this.additionalProperties = null;
} else {
this.additionalProperties = new LinkedHashMap(additionalProperties);
}
return (A) this;
}
public boolean hasAdditionalProperties() {
return this.additionalProperties != 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;
SubscriberSpecFluent that = (SubscriberSpecFluent) o;
if (!java.util.Objects.equals(delivery, that.delivery)) return false;
if (!java.util.Objects.equals(generation, that.generation)) return false;
if (!java.util.Objects.equals(replyUri, that.replyUri)) return false;
if (!java.util.Objects.equals(subscriberUri, that.subscriberUri)) return false;
if (!java.util.Objects.equals(uid, that.uid)) return false;
if (!java.util.Objects.equals(additionalProperties, that.additionalProperties)) return false;
return true;
}
public int hashCode() {
return java.util.Objects.hash(delivery, generation, replyUri, subscriberUri, uid, additionalProperties, super.hashCode());
}
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (delivery != null) { sb.append("delivery:"); sb.append(delivery + ","); }
if (generation != null) { sb.append("generation:"); sb.append(generation + ","); }
if (replyUri != null) { sb.append("replyUri:"); sb.append(replyUri + ","); }
if (subscriberUri != null) { sb.append("subscriberUri:"); sb.append(subscriberUri + ","); }
if (uid != null) { sb.append("uid:"); sb.append(uid + ","); }
if (additionalProperties != null && !additionalProperties.isEmpty()) { sb.append("additionalProperties:"); sb.append(additionalProperties); }
sb.append("}");
return sb.toString();
}
public class DeliveryNested extends DeliverySpecFluent> implements Nested{
DeliveryNested(DeliverySpec item) {
this.builder = new DeliverySpecBuilder(this, item);
}
DeliverySpecBuilder builder;
public N and() {
return (N) SubscriberSpecFluent.this.withDelivery(builder.build());
}
public N endDelivery() {
return and();
}
}
} © 2015 - 2025 Weber Informatics LLC | Privacy Policy