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

io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl Maven / Gradle / Ivy

package io.fabric8.knative.sources.v1;

import io.fabric8.knative.internal.pkg.apis.duck.v1.Destination;
import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.String;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesFluentImpl;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides;
import java.lang.Deprecated;
import io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl;
import io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder;
import java.lang.Boolean;

public class PingSourceSpecFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.fabric8.knative.sources.v1.PingSourceSpecFluent {

    private io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder ceOverrides;
    private java.lang.String contentType;
    private java.lang.String data;
    private java.lang.String dataBase64;
    private java.lang.String schedule;
    private io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder sink;
    private java.lang.String timezone;

    public PingSourceSpecFluentImpl() {
    }

    public PingSourceSpecFluentImpl(io.fabric8.knative.sources.v1.PingSourceSpec instance) {
        this.withCeOverrides(instance.getCeOverrides()); 
        this.withContentType(instance.getContentType()); 
        this.withData(instance.getData()); 
        this.withDataBase64(instance.getDataBase64()); 
        this.withSchedule(instance.getSchedule()); 
        this.withSink(instance.getSink()); 
        this.withTimezone(instance.getTimezone()); 
    }

    
    @java.lang.Deprecated
        
    /**
     * This method has been deprecated, please use method buildCeOverrides instead.
     * @return The buildable object.
     */
        public io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides getCeOverrides() {
        return this.ceOverrides!=null?this.ceOverrides.build():null;
    }

    public io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides buildCeOverrides() {
        return this.ceOverrides!=null?this.ceOverrides.build():null;
    }

    public A withCeOverrides(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides ceOverrides) {
        _visitables.get("ceOverrides").remove(this.ceOverrides);
        if (ceOverrides!=null){ this.ceOverrides= new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(ceOverrides); _visitables.get("ceOverrides").add(this.ceOverrides);} return (A) this;
    }

    public java.lang.Boolean hasCeOverrides() {
        return this.ceOverrides != null;
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested withNewCeOverrides() {
        return new io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl.CeOverridesNestedImpl();
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested withNewCeOverridesLike(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
        return new io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl.CeOverridesNestedImpl(item);
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested editCeOverrides() {
        return withNewCeOverridesLike(getCeOverrides());
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested editOrNewCeOverrides() {
        return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder().build());
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested editOrNewCeOverridesLike(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
        return withNewCeOverridesLike(getCeOverrides() != null ? getCeOverrides(): item);
    }

    public java.lang.String getContentType() {
        return this.contentType;
    }

    public A withContentType(java.lang.String contentType) {
        this.contentType=contentType; return (A) this;
    }

    public java.lang.Boolean hasContentType() {
        return this.contentType != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withContentType instead.
     */
        public A withNewContentType(java.lang.String arg0) {
        return (A)withContentType(new String(arg0));
    }

    public java.lang.String getData() {
        return this.data;
    }

    public A withData(java.lang.String data) {
        this.data=data; return (A) this;
    }

    public java.lang.Boolean hasData() {
        return this.data != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withData instead.
     */
        public A withNewData(java.lang.String arg0) {
        return (A)withData(new String(arg0));
    }

    public java.lang.String getDataBase64() {
        return this.dataBase64;
    }

    public A withDataBase64(java.lang.String dataBase64) {
        this.dataBase64=dataBase64; return (A) this;
    }

    public java.lang.Boolean hasDataBase64() {
        return this.dataBase64 != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withDataBase64 instead.
     */
        public A withNewDataBase64(java.lang.String arg0) {
        return (A)withDataBase64(new String(arg0));
    }

    public java.lang.String getSchedule() {
        return this.schedule;
    }

    public A withSchedule(java.lang.String schedule) {
        this.schedule=schedule; return (A) this;
    }

    public java.lang.Boolean hasSchedule() {
        return this.schedule != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withSchedule instead.
     */
        public A withNewSchedule(java.lang.String arg0) {
        return (A)withSchedule(new String(arg0));
    }

    
    @java.lang.Deprecated
        
    /**
     * This method has been deprecated, please use method buildSink instead.
     * @return The buildable object.
     */
        public io.fabric8.knative.internal.pkg.apis.duck.v1.Destination getSink() {
        return this.sink!=null?this.sink.build():null;
    }

    public io.fabric8.knative.internal.pkg.apis.duck.v1.Destination buildSink() {
        return this.sink!=null?this.sink.build():null;
    }

    public A withSink(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination sink) {
        _visitables.get("sink").remove(this.sink);
        if (sink!=null){ this.sink= new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(sink); _visitables.get("sink").add(this.sink);} return (A) this;
    }

    public java.lang.Boolean hasSink() {
        return this.sink != null;
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested withNewSink() {
        return new io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl.SinkNestedImpl();
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested withNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
        return new io.fabric8.knative.sources.v1.PingSourceSpecFluentImpl.SinkNestedImpl(item);
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested editSink() {
        return withNewSinkLike(getSink());
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested editOrNewSink() {
        return withNewSinkLike(getSink() != null ? getSink(): new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder().build());
    }

    public io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested editOrNewSinkLike(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
        return withNewSinkLike(getSink() != null ? getSink(): item);
    }

    public java.lang.String getTimezone() {
        return this.timezone;
    }

    public A withTimezone(java.lang.String timezone) {
        this.timezone=timezone; return (A) this;
    }

    public java.lang.Boolean hasTimezone() {
        return this.timezone != null;
    }

    
    @java.lang.Deprecated
        
    /**
     * Method is deprecated. use withTimezone instead.
     */
        public A withNewTimezone(java.lang.String arg0) {
        return (A)withTimezone(new String(arg0));
    }

    public boolean equals(java.lang.Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        PingSourceSpecFluentImpl that = (PingSourceSpecFluentImpl) o;
        if (ceOverrides != null ? !ceOverrides.equals(that.ceOverrides) :that.ceOverrides != null) return false;
        if (contentType != null ? !contentType.equals(that.contentType) :that.contentType != null) return false;
        if (data != null ? !data.equals(that.data) :that.data != null) return false;
        if (dataBase64 != null ? !dataBase64.equals(that.dataBase64) :that.dataBase64 != null) return false;
        if (schedule != null ? !schedule.equals(that.schedule) :that.schedule != null) return false;
        if (sink != null ? !sink.equals(that.sink) :that.sink != null) return false;
        if (timezone != null ? !timezone.equals(that.timezone) :that.timezone != null) return false;
        return true;
    }

    public int hashCode() {
        return java.util.Objects.hash(ceOverrides,  contentType,  data,  dataBase64,  schedule,  sink,  timezone,  super.hashCode());
    }

    public class CeOverridesNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesFluentImpl> implements io.fabric8.knative.sources.v1.PingSourceSpecFluent.CeOverridesNested,io.fabric8.kubernetes.api.builder.Nested {
        private final io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder builder;

            CeOverridesNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverrides item) {
                this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(this, item);
                        
            }

            CeOverridesNestedImpl() {
                this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.CloudEventOverridesBuilder(this);
                        
            }

            public N and() {
                return (N) PingSourceSpecFluentImpl.this.withCeOverrides(builder.build());
            }

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


    public class SinkNestedImpl extends io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationFluentImpl> implements io.fabric8.knative.sources.v1.PingSourceSpecFluent.SinkNested,io.fabric8.kubernetes.api.builder.Nested {
        private final io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder builder;

            SinkNestedImpl(io.fabric8.knative.internal.pkg.apis.duck.v1.Destination item) {
                this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(this, item);
                        
            }

            SinkNestedImpl() {
                this.builder = new io.fabric8.knative.internal.pkg.apis.duck.v1.DestinationBuilder(this);
                        
            }

            public N and() {
                return (N) PingSourceSpecFluentImpl.this.withSink(builder.build());
            }

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


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy