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

annotations.me.snowdrop.istio.api.model.v1.routing.IstioServiceFluentImpl Maven / Gradle / Ivy

package me.snowdrop.istio.api.model.v1.routing;

import javax.validation.constraints.Pattern;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import com.fasterxml.jackson.annotation.JsonProperty;
import javax.validation.constraints.Size;
import java.lang.String;
import java.util.LinkedHashMap;
import javax.validation.Valid;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import java.lang.Object;
import java.lang.Boolean;
import java.util.Map;

public class IstioServiceFluentImpl> extends io.fabric8.kubernetes.api.builder.BaseFluent implements IstioServiceFluent{

    private String domain;
    private Map labels;
    private String name;
    private String namespace;
    private String service;

    public IstioServiceFluentImpl(){
    }
    public IstioServiceFluentImpl(IstioService instance){
            this.withDomain(instance.getDomain()); 
            this.withLabels(instance.getLabels()); 
            this.withName(instance.getName()); 
            this.withNamespace(instance.getNamespace()); 
            this.withService(instance.getService()); 
    }

    public String getDomain(){
            return this.domain;
    }

    public A withDomain(String domain){
            this.domain=domain; return (A) this;
    }

    public Boolean hasDomain(){
            return this.domain != null;
    }

    public A addToLabels(String key,String value){
            if(this.labels == null && key != null && value != null) { this.labels = new LinkedHashMap(); }
            if(key != null && value != null) {this.labels.put(key, value);} return (A)this;
    }

    public A addToLabels(Map map){
            if(this.labels == null && map != null) { this.labels = new LinkedHashMap(); }
            if(map != null) { this.labels.putAll(map);} return (A)this;
    }

    public A removeFromLabels(String key){
            if(this.labels == null) { return (A) this; }
            if(key != null && this.labels != null) {this.labels.remove(key);} return (A)this;
    }

    public A removeFromLabels(Map map){
            if(this.labels == null) { return (A) this; }
            if(map != null) { for(Object key : map.keySet()) {if (this.labels != null){this.labels.remove(key);}}} return (A)this;
    }

    public Map getLabels(){
            return this.labels;
    }

    public A withLabels(Map labels){
            if (labels == null) { this.labels =  null;} else {this.labels = new LinkedHashMap(labels);} return (A) this;
    }

    public Boolean hasLabels(){
            return this.labels != null;
    }

    public String getName(){
            return this.name;
    }

    public A withName(String name){
            this.name=name; return (A) this;
    }

    public Boolean hasName(){
            return this.name != null;
    }

    public String getNamespace(){
            return this.namespace;
    }

    public A withNamespace(String namespace){
            this.namespace=namespace; return (A) this;
    }

    public Boolean hasNamespace(){
            return this.namespace != null;
    }

    public String getService(){
            return this.service;
    }

    public A withService(String service){
            this.service=service; return (A) this;
    }

    public Boolean hasService(){
            return this.service != null;
    }

    public boolean equals(Object o){
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;
            if (!super.equals(o)) return false;
            IstioServiceFluentImpl that = (IstioServiceFluentImpl) o;
            if (domain != null ? !domain.equals(that.domain) :that.domain != null) return false;
            if (labels != null ? !labels.equals(that.labels) :that.labels != null) return false;
            if (name != null ? !name.equals(that.name) :that.name != null) return false;
            if (namespace != null ? !namespace.equals(that.namespace) :that.namespace != null) return false;
            if (service != null ? !service.equals(that.service) :that.service != null) return false;
            return true;
    }




}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy