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

io.fabric8.kubernetes.api.model.extensions.ScaleStatusFluentImpl Maven / Gradle / Ivy

There is a newer version: 6.13.4
Show newest version
package io.fabric8.kubernetes.api.model.extensions;

import java.util.HashMap;
import java.io.Serializable;
import java.util.Map;
import java.util.Map;
import java.util.Map;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;

public class ScaleStatusFluentImpl> extends BaseFluent implements ScaleStatusFluent{

     Integer replicas;     Map selector = new HashMap();     String targetSelector;
public ScaleStatusFluentImpl(){
    
}
public ScaleStatusFluentImpl( ScaleStatus instance ){
    this.withReplicas(instance.getReplicas()); this.withSelector(instance.getSelector()); this.withTargetSelector(instance.getTargetSelector()); 
}

    public Integer getReplicas(){
    return this.replicas;
    }
    public A withReplicas( Integer replicas){
    this.replicas=replicas; return (A) this;
    }
    public A addToSelector( String key,  String value){
    if(key != null && value != null) {this.selector.put(key, value);} return (A)this;
    }
    public A addToSelector( Map map){
    if(map != null) { this.selector.putAll(map);} return (A)this;
    }
    public A removeFromSelector( String key){
    if(key != null) {this.selector.remove(key);} return (A)this;
    }
    public A removeFromSelector( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.selector.remove(key);}} return (A)this;
    }
    public Map getSelector(){
    return this.selector;
    }
    public A withSelector( Map selector){
    this.selector.clear();if (selector != null) {this.selector.putAll(selector);} return (A) this;
    }
    public String getTargetSelector(){
    return this.targetSelector;
    }
    public A withTargetSelector( String targetSelector){
    this.targetSelector=targetSelector; return (A) this;
    }
    public boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ScaleStatusFluentImpl that = (ScaleStatusFluentImpl) o;
if (replicas != null ? !replicas.equals(that.replicas) :that.replicas != null) return false;
if (selector != null ? !selector.equals(that.selector) :that.selector != null) return false;
if (targetSelector != null ? !targetSelector.equals(that.targetSelector) :that.targetSelector != null) return false;
return true;

    }



}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy