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

io.dekorate.application.config.ApplicationConfigBuilder Maven / Gradle / Ivy

package io.dekorate.application.config;

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

public class ApplicationConfigBuilder extends ApplicationConfigFluentImpl implements VisitableBuilder{

    ApplicationConfigFluent fluent;
    Boolean validationEnabled;

    public ApplicationConfigBuilder(){
            this(true);
    }
    public ApplicationConfigBuilder(Boolean validationEnabled){
            this(new ApplicationConfig(), validationEnabled);
    }
    public ApplicationConfigBuilder(ApplicationConfigFluent fluent){
            this(fluent, true);
    }
    public ApplicationConfigBuilder(ApplicationConfigFluent fluent,Boolean validationEnabled){
            this(fluent, new ApplicationConfig(), validationEnabled);
    }
    public ApplicationConfigBuilder(ApplicationConfigFluent fluent,ApplicationConfig instance){
            this(fluent, instance, true);
    }
    public ApplicationConfigBuilder(ApplicationConfigFluent fluent,ApplicationConfig instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withProject(instance.getProject()); 
            fluent.withAttributes(instance.getAttributes()); 
            fluent.withGroup(instance.getGroup()); 
            fluent.withName(instance.getName()); 
            fluent.withVersion(instance.getVersion()); 
            fluent.withOwners(instance.getOwners()); 
            fluent.withMaintainers(instance.getMaintainers()); 
            fluent.withInfo(instance.getInfo()); 
            fluent.withIcons(instance.getIcons()); 
            fluent.withLinks(instance.getLinks()); 
            fluent.withNotes(instance.getNotes()); 
            fluent.withKeywords(instance.getKeywords()); 
            this.validationEnabled = validationEnabled; 
    }
    public ApplicationConfigBuilder(ApplicationConfig instance){
            this(instance,true);
    }
    public ApplicationConfigBuilder(ApplicationConfig instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withProject(instance.getProject()); 
            this.withAttributes(instance.getAttributes()); 
            this.withGroup(instance.getGroup()); 
            this.withName(instance.getName()); 
            this.withVersion(instance.getVersion()); 
            this.withOwners(instance.getOwners()); 
            this.withMaintainers(instance.getMaintainers()); 
            this.withInfo(instance.getInfo()); 
            this.withIcons(instance.getIcons()); 
            this.withLinks(instance.getLinks()); 
            this.withNotes(instance.getNotes()); 
            this.withKeywords(instance.getKeywords()); 
            this.validationEnabled = validationEnabled; 
    }

    public EditableApplicationConfig build(){
            EditableApplicationConfig buildable = new EditableApplicationConfig(fluent.getProject(),fluent.getAttributes(),fluent.getGroup(),fluent.getName(),fluent.getVersion(),fluent.getOwners(),fluent.getMaintainers(),fluent.getInfo(),fluent.getIcons(),fluent.getLinks(),fluent.getNotes(),fluent.getKeywords());
            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;
            ApplicationConfigBuilder that = (ApplicationConfigBuilder) 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