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

io.fabric8.docker.client.ConfigFluentImpl Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
package io.fabric8.docker.client;

import org.slf4j.Logger;
import com.fasterxml.jackson.databind.JavaType;
import java.util.Map;
import java.util.Map;
import java.util.regex.Pattern;
import com.fasterxml.jackson.databind.JsonSerializable;
import com.fasterxml.jackson.databind.ObjectMapper;
import io.fabric8.docker.api.model.AuthConfig;
import com.fasterxml.jackson.core.ObjectCodec;
import com.fasterxml.jackson.core.TreeCodec;
import java.util.HashMap;
import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.AbstractMap;
import com.fasterxml.jackson.databind.type.MapLikeType;
import com.fasterxml.jackson.databind.type.MapType;
import com.fasterxml.jackson.core.type.ResolvedType;
import com.fasterxml.jackson.core.Versioned;
import com.fasterxml.jackson.databind.type.TypeBase;
import java.util.ArrayList;
import io.sundr.builder.Visitable;
import io.sundr.builder.Fluent;
import java.util.List;
import io.sundr.builder.BaseFluent;

public class ConfigFluentImpl> extends BaseFluent implements ConfigFluent{

     boolean trustCerts;     String masterUrl;     String caCertFile;     String caCertData;     String clientCertFile;     String clientCertData;     String clientKeyFile;     String clientKeyData;     String clientKeyAlgo;     String clientKeyPassphrase;     String username;     String password;     String oauthToken;     int imageBuildTimeout;     int imagePushTimeout;     int imageSearchTimeout;     int connectionTimeout;     int requestTimeout;     String httpProxy;     String httpsProxy;     List noProxy = new ArrayList();     Map authConfigs = new HashMap();
public ConfigFluentImpl(){
    
}
public ConfigFluentImpl( Config instance ){
    this.withTrustCerts(instance.isTrustCerts()); this.withMasterUrl(instance.getMasterUrl()); this.withCaCertFile(instance.getCaCertFile()); this.withCaCertData(instance.getCaCertData()); this.withClientCertFile(instance.getClientCertFile()); this.withClientCertData(instance.getClientCertData()); this.withClientKeyFile(instance.getClientKeyFile()); this.withClientKeyData(instance.getClientKeyData()); this.withClientKeyAlgo(instance.getClientKeyAlgo()); this.withClientKeyPassphrase(instance.getClientKeyPassphrase()); this.withUsername(instance.getUsername()); this.withPassword(instance.getPassword()); this.withOauthToken(instance.getOauthToken()); this.withImageBuildTimeout(instance.getImageBuildTimeout()); this.withImagePushTimeout(instance.getImagePushTimeout()); this.withImageSearchTimeout(instance.getImageSearchTimeout()); this.withConnectionTimeout(instance.getConnectionTimeout()); this.withRequestTimeout(instance.getRequestTimeout()); this.withHttpProxy(instance.getHttpProxy()); this.withHttpsProxy(instance.getHttpsProxy()); this.withNoProxy(instance.getNoProxy()); this.withAuthConfigs(instance.getAuthConfigs()); 
}

    public boolean isTrustCerts(){
    return this.trustCerts;
    }
    public T withTrustCerts( boolean trustCerts){
    this.trustCerts=trustCerts; return (T) this;
    }
    public String getMasterUrl(){
    return this.masterUrl;
    }
    public T withMasterUrl( String masterUrl){
    this.masterUrl=masterUrl; return (T) this;
    }
    public String getCaCertFile(){
    return this.caCertFile;
    }
    public T withCaCertFile( String caCertFile){
    this.caCertFile=caCertFile; return (T) this;
    }
    public String getCaCertData(){
    return this.caCertData;
    }
    public T withCaCertData( String caCertData){
    this.caCertData=caCertData; return (T) this;
    }
    public String getClientCertFile(){
    return this.clientCertFile;
    }
    public T withClientCertFile( String clientCertFile){
    this.clientCertFile=clientCertFile; return (T) this;
    }
    public String getClientCertData(){
    return this.clientCertData;
    }
    public T withClientCertData( String clientCertData){
    this.clientCertData=clientCertData; return (T) this;
    }
    public String getClientKeyFile(){
    return this.clientKeyFile;
    }
    public T withClientKeyFile( String clientKeyFile){
    this.clientKeyFile=clientKeyFile; return (T) this;
    }
    public String getClientKeyData(){
    return this.clientKeyData;
    }
    public T withClientKeyData( String clientKeyData){
    this.clientKeyData=clientKeyData; return (T) this;
    }
    public String getClientKeyAlgo(){
    return this.clientKeyAlgo;
    }
    public T withClientKeyAlgo( String clientKeyAlgo){
    this.clientKeyAlgo=clientKeyAlgo; return (T) this;
    }
    public String getClientKeyPassphrase(){
    return this.clientKeyPassphrase;
    }
    public T withClientKeyPassphrase( String clientKeyPassphrase){
    this.clientKeyPassphrase=clientKeyPassphrase; return (T) this;
    }
    public String getUsername(){
    return this.username;
    }
    public T withUsername( String username){
    this.username=username; return (T) this;
    }
    public String getPassword(){
    return this.password;
    }
    public T withPassword( String password){
    this.password=password; return (T) this;
    }
    public String getOauthToken(){
    return this.oauthToken;
    }
    public T withOauthToken( String oauthToken){
    this.oauthToken=oauthToken; return (T) this;
    }
    public int getImageBuildTimeout(){
    return this.imageBuildTimeout;
    }
    public T withImageBuildTimeout( int imageBuildTimeout){
    this.imageBuildTimeout=imageBuildTimeout; return (T) this;
    }
    public int getImagePushTimeout(){
    return this.imagePushTimeout;
    }
    public T withImagePushTimeout( int imagePushTimeout){
    this.imagePushTimeout=imagePushTimeout; return (T) this;
    }
    public int getImageSearchTimeout(){
    return this.imageSearchTimeout;
    }
    public T withImageSearchTimeout( int imageSearchTimeout){
    this.imageSearchTimeout=imageSearchTimeout; return (T) this;
    }
    public int getConnectionTimeout(){
    return this.connectionTimeout;
    }
    public T withConnectionTimeout( int connectionTimeout){
    this.connectionTimeout=connectionTimeout; return (T) this;
    }
    public int getRequestTimeout(){
    return this.requestTimeout;
    }
    public T withRequestTimeout( int requestTimeout){
    this.requestTimeout=requestTimeout; return (T) this;
    }
    public String getHttpProxy(){
    return this.httpProxy;
    }
    public T withHttpProxy( String httpProxy){
    this.httpProxy=httpProxy; return (T) this;
    }
    public String getHttpsProxy(){
    return this.httpsProxy;
    }
    public T withHttpsProxy( String httpsProxy){
    this.httpsProxy=httpsProxy; return (T) this;
    }
    public T withNoProxy( String ...noProxy){
    this.noProxy.clear(); if (noProxy != null) {for (String item :noProxy){ this.addToNoProxy(item);}} return (T) this;
    }
    public String[] getNoProxy(){
    List result = new ArrayList<>();
for (String item : noProxy) {
    result.add(item);
}
return result.toArray(new String[result.size()]);

    }
    public T addToNoProxy( String ...items){
    for (String item : items) {this.noProxy.add(item);} return (T)this;
    }
    public T removeFromNoProxy( String ...items){
    for (String item : items) {this.noProxy.remove(item);} return (T)this;
    }
    public T addToAuthConfigs( String key,  AuthConfig value){
    if(key != null && value != null) {this.authConfigs.put(key, value);} return (T)this;
    }
    public T addToAuthConfigs( Map map){
    if(map != null) { this.authConfigs.putAll(map);} return (T)this;
    }
    public T removeFromAuthConfigs( String key){
    if(key != null) {this.authConfigs.remove(key);} return (T)this;
    }
    public T removeFromAuthConfigs( Map map){
    if(map != null) { for(Object key : map.keySet()) {this.authConfigs.remove(key);}} return (T)this;
    }
    public Map getAuthConfigs(){
    return this.authConfigs;
    }
    public T withAuthConfigs( Map authConfigs){
    this.authConfigs.clear();if (authConfigs != null) {this.authConfigs.putAll(authConfigs);} return (T) this;
    }
    public boolean equals( Object o){
    
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ConfigFluentImpl that = (ConfigFluentImpl) o;
if (trustCerts != that.trustCerts) return false;
if (masterUrl != null ? !masterUrl.equals(that.masterUrl) :that.masterUrl != null) return false;
if (caCertFile != null ? !caCertFile.equals(that.caCertFile) :that.caCertFile != null) return false;
if (caCertData != null ? !caCertData.equals(that.caCertData) :that.caCertData != null) return false;
if (clientCertFile != null ? !clientCertFile.equals(that.clientCertFile) :that.clientCertFile != null) return false;
if (clientCertData != null ? !clientCertData.equals(that.clientCertData) :that.clientCertData != null) return false;
if (clientKeyFile != null ? !clientKeyFile.equals(that.clientKeyFile) :that.clientKeyFile != null) return false;
if (clientKeyData != null ? !clientKeyData.equals(that.clientKeyData) :that.clientKeyData != null) return false;
if (clientKeyAlgo != null ? !clientKeyAlgo.equals(that.clientKeyAlgo) :that.clientKeyAlgo != null) return false;
if (clientKeyPassphrase != null ? !clientKeyPassphrase.equals(that.clientKeyPassphrase) :that.clientKeyPassphrase != null) return false;
if (username != null ? !username.equals(that.username) :that.username != null) return false;
if (password != null ? !password.equals(that.password) :that.password != null) return false;
if (oauthToken != null ? !oauthToken.equals(that.oauthToken) :that.oauthToken != null) return false;
if (imageBuildTimeout != that.imageBuildTimeout) return false;
if (imagePushTimeout != that.imagePushTimeout) return false;
if (imageSearchTimeout != that.imageSearchTimeout) return false;
if (connectionTimeout != that.connectionTimeout) return false;
if (requestTimeout != that.requestTimeout) return false;
if (httpProxy != null ? !httpProxy.equals(that.httpProxy) :that.httpProxy != null) return false;
if (httpsProxy != null ? !httpsProxy.equals(that.httpsProxy) :that.httpsProxy != null) return false;
if (noProxy != null ? !noProxy.equals(that.noProxy) :that.noProxy != null) return false;
if (authConfigs != null ? !authConfigs.equals(that.authConfigs) :that.authConfigs != null) return false;
return true;

    }



}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy