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

io.fabric8.kubernetes.api.model.ServicePortBuilder Maven / Gradle / Ivy

package io.fabric8.kubernetes.api.model;

import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import java.lang.Object;
import java.lang.Boolean;
public class ServicePortBuilder extends io.fabric8.kubernetes.api.model.ServicePortFluentImpl implements io.fabric8.kubernetes.api.builder.VisitableBuilder{
  public ServicePortBuilder() {
    this(false);
  }
  public ServicePortBuilder(java.lang.Boolean validationEnabled) {
    this(new ServicePort(), validationEnabled);
  }
  public ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortFluent fluent) {
    this(fluent, false);
  }
  public ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortFluent fluent,java.lang.Boolean validationEnabled) {
    this(fluent, new ServicePort(), validationEnabled);
  }
  public ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortFluent fluent,io.fabric8.kubernetes.api.model.ServicePort instance) {
    this(fluent, instance, false);
  }
  public ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePortFluent fluent,io.fabric8.kubernetes.api.model.ServicePort instance,java.lang.Boolean validationEnabled) {
    this.fluent = fluent; 
    fluent.withAppProtocol(instance.getAppProtocol()); 
    fluent.withName(instance.getName()); 
    fluent.withNodePort(instance.getNodePort()); 
    fluent.withPort(instance.getPort()); 
    fluent.withProtocol(instance.getProtocol()); 
    fluent.withTargetPort(instance.getTargetPort()); 
    fluent.withAdditionalProperties(instance.getAdditionalProperties());

    this.validationEnabled = validationEnabled; 
  }
  public ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePort instance) {
    this(instance,false);
  }
  public ServicePortBuilder(io.fabric8.kubernetes.api.model.ServicePort instance,java.lang.Boolean validationEnabled) {
    this.fluent = this; 
    this.withAppProtocol(instance.getAppProtocol()); 
    this.withName(instance.getName()); 
    this.withNodePort(instance.getNodePort()); 
    this.withPort(instance.getPort()); 
    this.withProtocol(instance.getProtocol()); 
    this.withTargetPort(instance.getTargetPort()); 
    this.withAdditionalProperties(instance.getAdditionalProperties());

    this.validationEnabled = validationEnabled; 
  }
  io.fabric8.kubernetes.api.model.ServicePortFluent fluent;
  java.lang.Boolean validationEnabled;
  public io.fabric8.kubernetes.api.model.ServicePort build() {
    ServicePort buildable = new ServicePort(fluent.getAppProtocol(),fluent.getName(),fluent.getNodePort(),fluent.getPort(),fluent.getProtocol(),fluent.getTargetPort());
    buildable.setAdditionalProperties(fluent.getAdditionalProperties());
    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;
    ServicePortBuilder that = (ServicePortBuilder) 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 - 2025 Weber Informatics LLC | Privacy Policy