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

io.fabric8.knative.flows.v1.ParallelChannelStatusFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.flows.v1;

import io.fabric8.knative.internal.pkg.apis.Condition;
import io.fabric8.kubernetes.api.builder.Nested;
import io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl;
import io.fabric8.knative.internal.pkg.apis.ConditionBuilder;
import io.fabric8.knative.internal.pkg.apis.ConditionFluentImpl;
import io.fabric8.kubernetes.api.model.ObjectReference;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.model.ObjectReferenceBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

public class ParallelChannelStatusFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.flows.v1.ParallelChannelStatusFluent {

    private io.fabric8.kubernetes.api.model.ObjectReferenceBuilder channel;
    private io.fabric8.knative.internal.pkg.apis.ConditionBuilder ready;

    public ParallelChannelStatusFluentImpl() {
    }

    public ParallelChannelStatusFluentImpl(io.fabric8.knative.flows.v1.ParallelChannelStatus instance) {
        this.withChannel(instance.getChannel()); 
        this.withReady(instance.getReady()); 
    }

    
    @java.lang.Deprecated
        
    /**
     * This method has been deprecated, please use method buildChannel instead.
     * @return The buildable object.
     */
        public io.fabric8.kubernetes.api.model.ObjectReference getChannel() {
        return this.channel!=null?this.channel.build():null;
    }

    public io.fabric8.kubernetes.api.model.ObjectReference buildChannel() {
        return this.channel!=null?this.channel.build():null;
    }

    public A withChannel(io.fabric8.kubernetes.api.model.ObjectReference channel) {
        _visitables.get("channel").remove(this.channel);
        if (channel!=null){ this.channel= new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(channel); _visitables.get("channel").add(this.channel);} return (A) this;
    }

    public java.lang.Boolean hasChannel() {
        return this.channel != null;
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ChannelNested withNewChannel() {
        return new io.fabric8.knative.flows.v1.ParallelChannelStatusFluentImpl.ChannelNestedImpl();
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ChannelNested withNewChannelLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
        return new io.fabric8.knative.flows.v1.ParallelChannelStatusFluentImpl.ChannelNestedImpl(item);
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ChannelNested editChannel() {
        return withNewChannelLike(getChannel());
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ChannelNested editOrNewChannel() {
        return withNewChannelLike(getChannel() != null ? getChannel(): new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder().build());
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ChannelNested editOrNewChannelLike(io.fabric8.kubernetes.api.model.ObjectReference item) {
        return withNewChannelLike(getChannel() != null ? getChannel(): item);
    }

    
    @java.lang.Deprecated
        
    /**
     * This method has been deprecated, please use method buildReady instead.
     * @return The buildable object.
     */
        public io.fabric8.knative.internal.pkg.apis.Condition getReady() {
        return this.ready!=null?this.ready.build():null;
    }

    public io.fabric8.knative.internal.pkg.apis.Condition buildReady() {
        return this.ready!=null?this.ready.build():null;
    }

    public A withReady(io.fabric8.knative.internal.pkg.apis.Condition ready) {
        _visitables.get("ready").remove(this.ready);
        if (ready!=null){ this.ready= new io.fabric8.knative.internal.pkg.apis.ConditionBuilder(ready); _visitables.get("ready").add(this.ready);} return (A) this;
    }

    public java.lang.Boolean hasReady() {
        return this.ready != null;
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ReadyNested withNewReady() {
        return new io.fabric8.knative.flows.v1.ParallelChannelStatusFluentImpl.ReadyNestedImpl();
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ReadyNested withNewReadyLike(io.fabric8.knative.internal.pkg.apis.Condition item) {
        return new io.fabric8.knative.flows.v1.ParallelChannelStatusFluentImpl.ReadyNestedImpl(item);
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ReadyNested editReady() {
        return withNewReadyLike(getReady());
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ReadyNested editOrNewReady() {
        return withNewReadyLike(getReady() != null ? getReady(): new io.fabric8.knative.internal.pkg.apis.ConditionBuilder().build());
    }

    public io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ReadyNested editOrNewReadyLike(io.fabric8.knative.internal.pkg.apis.Condition item) {
        return withNewReadyLike(getReady() != null ? getReady(): item);
    }

    public boolean equals(java.lang.Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ParallelChannelStatusFluentImpl that = (ParallelChannelStatusFluentImpl) o;
        if (channel != null ? !channel.equals(that.channel) :that.channel != null) return false;
        if (ready != null ? !ready.equals(that.ready) :that.ready != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(channel,  ready,  super.hashCode());
    }

    public class ChannelNestedImpl extends io.fabric8.kubernetes.api.model.ObjectReferenceFluentImpl> implements io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ChannelNested,io.fabric8.kubernetes.api.builder.Nested {
        private final io.fabric8.kubernetes.api.model.ObjectReferenceBuilder builder;

            ChannelNestedImpl(io.fabric8.kubernetes.api.model.ObjectReference item) {
                this.builder = new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(this, item);
                        
            }

            ChannelNestedImpl() {
                this.builder = new io.fabric8.kubernetes.api.model.ObjectReferenceBuilder(this);
                        
            }

            public N and() {
                return (N) ParallelChannelStatusFluentImpl.this.withChannel(builder.build());
            }

            public N endChannel() {
                return and();
            }
    }


    public class ReadyNestedImpl extends io.fabric8.knative.internal.pkg.apis.ConditionFluentImpl> implements io.fabric8.knative.flows.v1.ParallelChannelStatusFluent.ReadyNested,io.fabric8.kubernetes.api.builder.Nested {
        private final io.fabric8.knative.internal.pkg.apis.ConditionBuilder builder;

            ReadyNestedImpl(io.fabric8.knative.internal.pkg.apis.Condition item) {
                this.builder = new io.fabric8.knative.internal.pkg.apis.ConditionBuilder(this, item);
                        
            }

            ReadyNestedImpl() {
                this.builder = new io.fabric8.knative.internal.pkg.apis.ConditionBuilder(this);
                        
            }

            public N and() {
                return (N) ParallelChannelStatusFluentImpl.this.withReady(builder.build());
            }

            public N endReady() {
                return and();
            }
    }


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy