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

io.fabric8.knative.duck.v1.CloudEventAttributesBuilder Maven / Gradle / Ivy

package io.fabric8.knative.duck.v1;

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

public class CloudEventAttributesBuilder extends CloudEventAttributesFluentImpl implements VisitableBuilder{

    CloudEventAttributesFluent fluent;
    Boolean validationEnabled;

    public CloudEventAttributesBuilder(){
            this(true);
    }
    public CloudEventAttributesBuilder(Boolean validationEnabled){
            this(new CloudEventAttributes(), validationEnabled);
    }
    public CloudEventAttributesBuilder(CloudEventAttributesFluent fluent){
            this(fluent, true);
    }
    public CloudEventAttributesBuilder(CloudEventAttributesFluent fluent,Boolean validationEnabled){
            this(fluent, new CloudEventAttributes(), validationEnabled);
    }
    public CloudEventAttributesBuilder(CloudEventAttributesFluent fluent,CloudEventAttributes instance){
            this(fluent, instance, true);
    }
    public CloudEventAttributesBuilder(CloudEventAttributesFluent fluent,CloudEventAttributes instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withSource(instance.getSource()); 
            fluent.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }
    public CloudEventAttributesBuilder(CloudEventAttributes instance){
            this(instance,true);
    }
    public CloudEventAttributesBuilder(CloudEventAttributes instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withSource(instance.getSource()); 
            this.withType(instance.getType()); 
            this.validationEnabled = validationEnabled; 
    }

    public CloudEventAttributes build(){
            CloudEventAttributes buildable = new CloudEventAttributes(fluent.getSource(),fluent.getType());
            return buildable;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            CloudEventAttributesBuilder that = (CloudEventAttributesBuilder) 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;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy