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

io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluentImpl Maven / Gradle / Ivy

There is a newer version: 0.44.0
Show newest version
package io.strimzi.api.kafka.model;

import io.fabric8.kubernetes.api.builder.Nested;
import java.lang.Deprecated;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;

  
  /**
   * A representation of the HTTP configuration.
   */
  public class KafkaBridgeHttpConfigFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent {

    private int port;
    private io.strimzi.api.kafka.model.KafkaBridgeHttpCorsBuilder cors;

    public KafkaBridgeHttpConfigFluentImpl() {
    }

    public KafkaBridgeHttpConfigFluentImpl(io.strimzi.api.kafka.model.KafkaBridgeHttpConfig instance) {
        this.withPort(instance.getPort()); 
        this.withCors(instance.getCors());
    }

    public int getPort() {
        return this.port;
    }

    public A withPort(int port) {
        this.port=port; return (A) this;
    }

    public java.lang.Boolean hasPort() {
        return true;
    }

    
    @java.lang.Deprecated
        
    /**
     * This method has been deprecated, please use method buildCors instead.
     * @return The buildable object.
     */
        public io.strimzi.api.kafka.model.KafkaBridgeHttpCors getCors() {
        return this.cors!=null?this.cors.build():null;
    }

    public io.strimzi.api.kafka.model.KafkaBridgeHttpCors buildCors() {
        return this.cors!=null?this.cors.build():null;
    }

    public A withCors(io.strimzi.api.kafka.model.KafkaBridgeHttpCors cors) {
        _visitables.get("cors").remove(this.cors);
        if (cors!=null){ this.cors= new io.strimzi.api.kafka.model.KafkaBridgeHttpCorsBuilder(cors); _visitables.get("cors").add(this.cors);} return (A) this;
    }

    public java.lang.Boolean hasCors() {
        return this.cors != null;
    }

    public io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent.CorsNested withNewCors() {
        return new io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluentImpl.CorsNestedImpl();
    }

    public io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent.CorsNested withNewCorsLike(io.strimzi.api.kafka.model.KafkaBridgeHttpCors item) {
        return new io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluentImpl.CorsNestedImpl(item);
    }

    public io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent.CorsNested editCors() {
        return withNewCorsLike(getCors());
    }

    public io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent.CorsNested editOrNewCors() {
        return withNewCorsLike(getCors() != null ? getCors(): new io.strimzi.api.kafka.model.KafkaBridgeHttpCorsBuilder().build());
    }

    public io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent.CorsNested editOrNewCorsLike(io.strimzi.api.kafka.model.KafkaBridgeHttpCors item) {
        return withNewCorsLike(getCors() != null ? getCors(): item);
    }

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

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

      
  /**
   * A representation of the HTTP CORS configuration.
   */
  public class CorsNestedImpl extends io.strimzi.api.kafka.model.KafkaBridgeHttpCorsFluentImpl> implements io.strimzi.api.kafka.model.KafkaBridgeHttpConfigFluent.CorsNested,io.fabric8.kubernetes.api.builder.Nested {
        private final io.strimzi.api.kafka.model.KafkaBridgeHttpCorsBuilder builder;

            CorsNestedImpl(io.strimzi.api.kafka.model.KafkaBridgeHttpCors item) {
                this.builder = new io.strimzi.api.kafka.model.KafkaBridgeHttpCorsBuilder(this, item);
                        
            }

            CorsNestedImpl() {
                this.builder = new io.strimzi.api.kafka.model.KafkaBridgeHttpCorsBuilder(this);
                        
            }

            public N and() {
                return (N) KafkaBridgeHttpConfigFluentImpl.this.withCors(builder.build());
            }

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


}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy