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

annotations.io.fabric8.docker.api.model.NetworkResourceFluentImpl Maven / Gradle / Ivy

There is a newer version: 1.0.15
Show newest version
package io.fabric8.docker.api.model;

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 java.util.Map;
import io.fabric8.docker.api.builder.Visitable;
import io.fabric8.docker.api.builder.Builder;
import io.fabric8.docker.api.builder.Visitable;
import io.fabric8.docker.api.builder.VisitableBuilder;
import io.fabric8.docker.api.builder.BaseFluent;
import io.fabric8.docker.api.builder.Nested;
import io.fabric8.docker.api.builder.Fluent;

public class NetworkResourceFluentImpl> extends BaseFluent implements NetworkResourceFluent{

     Map Containers = new HashMap();     String Driver;     VisitableBuilder IPAM;     String Id;     String Name;     Map Options = new HashMap();     String Scope;     Map additionalProperties = new HashMap();
public NetworkResourceFluentImpl(){
    
}
public NetworkResourceFluentImpl( NetworkResource instance ){
    this.withContainers(instance.getContainers()); this.withDriver(instance.getDriver()); this.withIPAM(instance.getIPAM()); this.withId(instance.getId()); this.withName(instance.getName()); this.withOptions(instance.getOptions()); this.withScope(instance.getScope()); 
}

    public T addToContainers( String key,  EndpointResource value){
    if(key != null && value != null) {this.Containers.put(key, value);} return (T)this;
    }
    public T addToContainers( Map map){
    if(map != null) { this.Containers.putAll(map);} return (T)this;
    }
    public T removeFromContainers( String key){
    if(key != null) {this.Containers.remove(key);} return (T)this;
    }
    public T removeFromContainers( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.Containers.remove(key);}} return (T)this;
    }
    public Map getContainers(){
    return this.Containers;
    }
    public T withContainers( Map Containers){
    this.Containers.clear();if (Containers != null) {this.Containers.putAll(Containers);} return (T) this;
    }
    public String getDriver(){
    return this.Driver;
    }
    public T withDriver( String Driver){
    this.Driver=Driver; return (T) this;
    }
    public IPAM getIPAM(){
    return this.IPAM!=null?this.IPAM.build():null;
    }
    public T withIPAM( IPAM IPAM){
    if (IPAM!=null){ this.IPAM= new IPAMBuilder(IPAM); _visitables.add(this.IPAM);} return (T) this;
    }
    public IPAMNested withNewIPAM(){
    return new IPAMNestedImpl();
    }
    public IPAMNested withNewIPAMLike( IPAM item){
    return new IPAMNestedImpl(item);
    }
    public IPAMNested editIPAM(){
    return withNewIPAMLike(getIPAM());
    }
    public String getId(){
    return this.Id;
    }
    public T withId( String Id){
    this.Id=Id; return (T) this;
    }
    public String getName(){
    return this.Name;
    }
    public T withName( String Name){
    this.Name=Name; return (T) this;
    }
    public T addToOptions( String key,  String value){
    if(key != null && value != null) {this.Options.put(key, value);} return (T)this;
    }
    public T addToOptions( Map map){
    if(map != null) { this.Options.putAll(map);} return (T)this;
    }
    public T removeFromOptions( String key){
    if(key != null) {this.Options.remove(key);} return (T)this;
    }
    public T removeFromOptions( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.Options.remove(key);}} return (T)this;
    }
    public Map getOptions(){
    return this.Options;
    }
    public T withOptions( Map Options){
    this.Options.clear();if (Options != null) {this.Options.putAll(Options);} return (T) this;
    }
    public String getScope(){
    return this.Scope;
    }
    public T withScope( String Scope){
    this.Scope=Scope; 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;
NetworkResourceFluentImpl that = (NetworkResourceFluentImpl) o;
if (Containers != null ? !Containers.equals(that.Containers) :that.Containers != null) return false;
if (Driver != null ? !Driver.equals(that.Driver) :that.Driver != null) return false;
if (IPAM != null ? !IPAM.equals(that.IPAM) :that.IPAM != null) return false;
if (Id != null ? !Id.equals(that.Id) :that.Id != null) return false;
if (Name != null ? !Name.equals(that.Name) :that.Name != null) return false;
if (Options != null ? !Options.equals(that.Options) :that.Options != null) return false;
if (Scope != null ? !Scope.equals(that.Scope) :that.Scope != null) return false;
if (additionalProperties != null ? !additionalProperties.equals(that.additionalProperties) :that.additionalProperties != null) return false;
return true;

    }

    public class IPAMNestedImpl extends IPAMFluentImpl> implements IPAMNested{

        private final IPAMBuilder builder;
    
             IPAMNestedImpl (){
        this.builder = new IPAMBuilder(this);
        }
             IPAMNestedImpl ( IPAM item){
        this.builder = new IPAMBuilder(this, item);
        }
    
            public N endIPAM(){
            return and();
        }
            public N and(){
            return (N) NetworkResourceFluentImpl.this.withIPAM(builder.build());
        }
    
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy