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

io.fabric8.openshift.api.model.ExecNewPodHookFluentImpl Maven / Gradle / Ivy

package io.fabric8.openshift.api.model;

import java.util.List;
import java.util.ArrayList;
import java.util.RandomAccess;
import java.util.Map;
import java.util.Map;
import java.util.List;
import java.util.List;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.HashMap;
import java.io.Serializable;
import java.util.Collection;
import java.util.AbstractMap;
import io.fabric8.kubernetes.api.model.EnvVar;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.builder.Builder;
import io.fabric8.kubernetes.api.builder.VisitableBuilder;
import io.fabric8.kubernetes.api.builder.Visitable;
import io.fabric8.kubernetes.api.model.EnvVarBuilder;
import io.fabric8.kubernetes.api.builder.BaseFluent;
import io.fabric8.kubernetes.api.builder.Fluent;
import io.fabric8.kubernetes.api.model.EnvVarFluent;
import io.fabric8.kubernetes.api.builder.Nested;
import java.util.List;
import io.fabric8.kubernetes.api.model.EnvVarFluentImpl;

public class ExecNewPodHookFluentImpl> extends BaseFluent implements ExecNewPodHookFluent{

     List command = new ArrayList();     String containerName;     List> env = new ArrayList();     List volumes = new ArrayList();     Map additionalProperties = new HashMap();
public ExecNewPodHookFluentImpl(){
    
}
public ExecNewPodHookFluentImpl( ExecNewPodHook instance ){
    this.withCommand(instance.getCommand()); this.withContainerName(instance.getContainerName()); this.withEnv(instance.getEnv()); this.withVolumes(instance.getVolumes()); 
}

    public T addToCommand( String ...items){
    for (String item : items) {this.command.add(item);} return (T)this;
    }
    public T removeFromCommand( String ...items){
    for (String item : items) {this.command.remove(item);} return (T)this;
    }
    public List getCommand(){
    return this.command;
    }
    public T withCommand( List command){
    this.command.clear();if (command != null) {for (String item : command){this.addToCommand(item);}} return (T) this;
    }
    public T withCommand( String ...command){
    this.command.clear(); if (command != null) {for (String item :command){ this.addToCommand(item);}} return (T) this;
    }
    public String getContainerName(){
    return this.containerName;
    }
    public T withContainerName( String containerName){
    this.containerName=containerName; return (T) this;
    }
    public T addToEnv( EnvVar ...items){
    for (EnvVar item : items) {EnvVarBuilder builder = new EnvVarBuilder(item);_visitables.add(builder);this.env.add(builder);} return (T)this;
    }
    public T removeFromEnv( EnvVar ...items){
    for (EnvVar item : items) {EnvVarBuilder builder = new EnvVarBuilder(item);_visitables.remove(builder);this.env.remove(builder);} return (T)this;
    }
    public List getEnv(){
    return build(env);
    }
    public T withEnv( List env){
    this.env.clear();if (env != null) {for (EnvVar item : env){this.addToEnv(item);}} return (T) this;
    }
    public T withEnv( EnvVar ...env){
    this.env.clear(); if (env != null) {for (EnvVar item :env){ this.addToEnv(item);}} return (T) this;
    }
    public EnvNested addNewEnv(){
    return new EnvNestedImpl();
    }
    public EnvNested addNewEnvLike( EnvVar item){
    return new EnvNestedImpl(item);
    }
    public T addToVolumes( String ...items){
    for (String item : items) {this.volumes.add(item);} return (T)this;
    }
    public T removeFromVolumes( String ...items){
    for (String item : items) {this.volumes.remove(item);} return (T)this;
    }
    public List getVolumes(){
    return this.volumes;
    }
    public T withVolumes( List volumes){
    this.volumes.clear();if (volumes != null) {for (String item : volumes){this.addToVolumes(item);}} return (T) this;
    }
    public T withVolumes( String ...volumes){
    this.volumes.clear(); if (volumes != null) {for (String item :volumes){ this.addToVolumes(item);}} return (T) this;
    }
    public T addToAdditionalProperties( String key,  Object value){
    if(key != null && value != null) {this.additionalProperties.put(key, value);} return (T)this;
    }
    public T addToAdditionalProperties( Map map){
    if(map != null) { this.additionalProperties.putAll(map);} return (T)this;
    }
    public T removeFromAdditionalProperties( String key){
    if(key != null) {this.additionalProperties.remove(key);} return (T)this;
    }
    public T removeFromAdditionalProperties( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.additionalProperties.remove(key);}} return (T)this;
    }
    public Map getAdditionalProperties(){
    return this.additionalProperties;
    }
    public T withAdditionalProperties( Map additionalProperties){
    this.additionalProperties.clear();if (additionalProperties != null) {this.additionalProperties.putAll(additionalProperties);} return (T) this;
    }
    public boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ExecNewPodHookFluentImpl that = (ExecNewPodHookFluentImpl) o;
if (command != null ? !command.equals(that.command) :that.command != null) return false;
if (containerName != null ? !containerName.equals(that.containerName) :that.containerName != null) return false;
if (env != null ? !env.equals(that.env) :that.env != null) return false;
if (volumes != null ? !volumes.equals(that.volumes) :that.volumes != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class EnvNestedImpl extends EnvVarFluentImpl> implements EnvNested{

        private final EnvVarBuilder builder;
    
             EnvNestedImpl (){
        this.builder = new EnvVarBuilder(this);
        }
             EnvNestedImpl ( EnvVar item){
        this.builder = new EnvVarBuilder(this, item);
        }
    
            public N endEnv(){
            return and();
        }
            public N and(){
            return (N) ExecNewPodHookFluentImpl.this.addToEnv(builder.build());
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy