All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.strimzi.api.kafka.model.status.KafkaConnectStatusBuilder Maven / Gradle / Ivy

There is a newer version: 0.44.0
Show newest version
package io.strimzi.api.kafka.model.status;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;

  
  /**
   * Represents a status of the Kafka Connect resource
   */
  public class KafkaConnectStatusBuilder extends io.strimzi.api.kafka.model.status.KafkaConnectStatusFluentImpl implements io.fabric8.kubernetes.api.builder.VisitableBuilder {

    io.strimzi.api.kafka.model.status.KafkaConnectStatusFluent fluent;
    java.lang.Boolean validationEnabled;

    public KafkaConnectStatusBuilder() {
        this(true);
    }

    public KafkaConnectStatusBuilder(java.lang.Boolean validationEnabled) {
        this(new KafkaConnectStatus(), validationEnabled);
    }

    public KafkaConnectStatusBuilder(io.strimzi.api.kafka.model.status.KafkaConnectStatusFluent fluent) {
        this(fluent, true);
    }

    public KafkaConnectStatusBuilder(io.strimzi.api.kafka.model.status.KafkaConnectStatusFluent fluent,java.lang.Boolean validationEnabled) {
        this(fluent, new KafkaConnectStatus(), validationEnabled);
    }

    public KafkaConnectStatusBuilder(io.strimzi.api.kafka.model.status.KafkaConnectStatusFluent fluent,io.strimzi.api.kafka.model.status.KafkaConnectStatus instance) {
        this(fluent, instance, true);
    }

    public KafkaConnectStatusBuilder(io.strimzi.api.kafka.model.status.KafkaConnectStatusFluent fluent,io.strimzi.api.kafka.model.status.KafkaConnectStatus instance,java.lang.Boolean validationEnabled) {
        this.fluent = fluent; 
        fluent.withUrl(instance.getUrl());
        
        fluent.withConnectorPlugins(instance.getConnectorPlugins());
        
        fluent.withReplicas(instance.getReplicas());
        
        fluent.withLabelSelector(instance.getLabelSelector());
        
        fluent.withConditions(instance.getConditions());
        
        fluent.withObservedGeneration(instance.getObservedGeneration());
        
        this.validationEnabled = validationEnabled; 
    }

    public KafkaConnectStatusBuilder(io.strimzi.api.kafka.model.status.KafkaConnectStatus instance) {
        this(instance,true);
    }

    public KafkaConnectStatusBuilder(io.strimzi.api.kafka.model.status.KafkaConnectStatus instance,java.lang.Boolean validationEnabled) {
        this.fluent = this; 
        this.withUrl(instance.getUrl());
        
        this.withConnectorPlugins(instance.getConnectorPlugins());
        
        this.withReplicas(instance.getReplicas());
        
        this.withLabelSelector(instance.getLabelSelector());
        
        this.withConditions(instance.getConditions());
        
        this.withObservedGeneration(instance.getObservedGeneration());
        
        this.validationEnabled = validationEnabled; 
    }

    public io.strimzi.api.kafka.model.status.KafkaConnectStatus build() {
        KafkaConnectStatus buildable = new KafkaConnectStatus();
        buildable.setConditions(fluent.getConditions());
        buildable.setObservedGeneration(fluent.getObservedGeneration());
        buildable.setUrl(fluent.getUrl());
        buildable.setConnectorPlugins(fluent.getConnectorPlugins());
        buildable.setReplicas(fluent.getReplicas());
        buildable.setLabelSelector(fluent.getLabelSelector());
        return buildable;
    }

    public boolean equals(java.lang.Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        if (!super.equals(o)) return false;
        KafkaConnectStatusBuilder that = (KafkaConnectStatusBuilder) o;
        if (fluent != null &&fluent != this ? !fluent.equals(that.fluent) :that.fluent != null &&fluent != this ) return false;
        
        if (validationEnabled != null ? !validationEnabled.equals(that.validationEnabled) :that.validationEnabled != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(fluent,  validationEnabled,  super.hashCode());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy