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

annotations.io.fabric8.openshift.api.model.RoutePortFluentImpl Maven / Gradle / Ivy

There is a newer version: 4.1.1
Show newest version
package io.fabric8.openshift.api.model;

import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.model.IntOrString;
import java.lang.String;
import java.lang.Integer;
import java.lang.Object;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.model.IntOrStringFluentImpl;
import io.fabric8.kubernetes.api.model.IntOrStringBuilder;
import com.fasterxml.jackson.databind.JsonSerializer;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import java.lang.Override;
import com.fasterxml.jackson.databind.JsonDeserializer;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;

public class RoutePortFluentImpl> extends BaseFluent implements RoutePortFluent{

    private VisitableBuilder targetPort;

    public RoutePortFluentImpl(){
    }
    public RoutePortFluentImpl(RoutePort instance){
            this.withTargetPort(instance.getTargetPort()); 
    }

    public IntOrString getTargetPort(){
            return this.targetPort!=null?this.targetPort.build():null;
    }

    public A withTargetPort(IntOrString targetPort){
            if (targetPort!=null){ this.targetPort= new IntOrStringBuilder(targetPort); _visitables.add(this.targetPort);} return (A) this;
    }

    public RoutePortFluent.TargetPortNested withNewTargetPort(){
            return new TargetPortNestedImpl();
    }

    public RoutePortFluent.TargetPortNested withNewTargetPortLike(IntOrString item){
            return new TargetPortNestedImpl(item);
    }

    public RoutePortFluent.TargetPortNested editTargetPort(){
            return withNewTargetPortLike(getTargetPort());
    }

    public A withNewTargetPort(String strVal){
            return (A)withTargetPort(new IntOrString(strVal));
    }

    public A withNewTargetPort(Integer intVal){
            return (A)withTargetPort(new IntOrString(intVal));
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            RoutePortFluentImpl that = (RoutePortFluentImpl) o;
            if (targetPort != null ? !targetPort.equals(that.targetPort) :that.targetPort != null) return false;
            return true;
    }


    public class TargetPortNestedImpl extends IntOrStringFluentImpl> implements RoutePortFluent.TargetPortNested,Nested{

            private final IntOrStringBuilder builder;
    
            TargetPortNestedImpl(){
                    this.builder = new IntOrStringBuilder(this);
            }
            TargetPortNestedImpl(IntOrString item){
                    this.builder = new IntOrStringBuilder(this, item);
            }
    
    public N endTargetPort(){
            return and();
    }
    public N and(){
            return (N) RoutePortFluentImpl.this.withTargetPort(builder.build());
    }

}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy