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

me.snowdrop.istio.api.model.v1.mixer.template.LogEntryBuilder Maven / Gradle / Ivy

package me.snowdrop.istio.api.model.v1.mixer.template;

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

public class LogEntryBuilder extends LogEntryFluentImpl implements VisitableBuilder{

    LogEntryFluent fluent;
    Boolean validationEnabled;

    public LogEntryBuilder(){
            this(true);
    }
    public LogEntryBuilder(Boolean validationEnabled){
            this(new LogEntry(), validationEnabled);
    }
    public LogEntryBuilder(LogEntryFluent fluent){
            this(fluent, true);
    }
    public LogEntryBuilder(LogEntryFluent fluent,Boolean validationEnabled){
            this(fluent, new LogEntry(), validationEnabled);
    }
    public LogEntryBuilder(LogEntryFluent fluent,LogEntry instance){
            this(fluent, instance, true);
    }
    public LogEntryBuilder(LogEntryFluent fluent,LogEntry instance,Boolean validationEnabled){
            this.fluent = fluent; 
            fluent.withMonitoredResourceDimensions(instance.getMonitoredResourceDimensions()); 
            fluent.withMonitoredResourceType(instance.getMonitoredResourceType()); 
            fluent.withName(instance.getName()); 
            fluent.withSeverity(instance.getSeverity()); 
            fluent.withTimestamp(instance.getTimestamp()); 
            fluent.withVariables(instance.getVariables()); 
            this.validationEnabled = validationEnabled; 
    }
    public LogEntryBuilder(LogEntry instance){
            this(instance,true);
    }
    public LogEntryBuilder(LogEntry instance,Boolean validationEnabled){
            this.fluent = this; 
            this.withMonitoredResourceDimensions(instance.getMonitoredResourceDimensions()); 
            this.withMonitoredResourceType(instance.getMonitoredResourceType()); 
            this.withName(instance.getName()); 
            this.withSeverity(instance.getSeverity()); 
            this.withTimestamp(instance.getTimestamp()); 
            this.withVariables(instance.getVariables()); 
            this.validationEnabled = validationEnabled; 
    }

    public LogEntry build(){
            LogEntry buildable = new LogEntry(fluent.getMonitoredResourceDimensions(),fluent.getMonitoredResourceType(),fluent.getName(),fluent.getSeverity(),fluent.getTimestamp(),fluent.getVariables());
            io.fabric8.kubernetes.api.builder.ValidationUtils.validate(buildable);
            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;
            LogEntryBuilder that = (LogEntryBuilder) 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