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

com.solidfire.element.api.NetworkConfig Maven / Gradle / Ivy

The newest version!
/*
 * Copyright © 2014-2016 NetApp, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
/*
 * DO NOT EDIT THIS CODE BY HAND! It has been generated with jsvcgen.
 */
package com.solidfire.element.api;

import com.solidfire.gson.Gson;
import com.solidfire.core.client.Attributes;
import com.solidfire.gson.annotations.SerializedName;
import com.solidfire.core.annotation.Since;
import com.solidfire.core.javautil.Optional;
import java.io.Serializable;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Objects;

/**
 * NetworkConfig  
 **/

public class NetworkConfig implements Serializable {

    public static final long serialVersionUID = -6490718356259567027L;
    @SerializedName("#default") private Optional _default;
    @SerializedName("bond-master") private Optional bondMaster;
    @SerializedName("virtualNetworkTag") private Optional virtualNetworkTag;
    @SerializedName("address") private Optional address;
    @SerializedName("auto") private Optional auto;
    @SerializedName("bond-downdelay") private Optional bondDowndelay;
    @SerializedName("bond-fail_over_mac") private Optional bondFailOverMac;
    @SerializedName("bond-primary_reselect") private Optional bondPrimaryReselect;
    @SerializedName("bond-lacp_rate") private Optional bondLacpRate;
    @SerializedName("bond-miimon") private Optional bondMiimon;
    @SerializedName("bond-mode") private Optional bondMode;
    @SerializedName("bond-slaves") private Optional bondSlaves;
    @SerializedName("bond-updelay") private Optional bondUpdelay;
    @SerializedName("dns-nameservers") private Optional dnsNameservers;
    @SerializedName("dns-search") private Optional dnsSearch;
    @SerializedName("family") private Optional family;
    @SerializedName("gateway") private Optional gateway;
    @SerializedName("macAddress") private Optional macAddress;
    @SerializedName("macAddressPermanent") private Optional macAddressPermanent;
    @SerializedName("method") private Optional method;
    @SerializedName("mtu") private Optional mtu;
    @SerializedName("netmask") private Optional netmask;
    @SerializedName("network") private Optional network;
    @SerializedName("physical") private Optional physical;
    @SerializedName("routes") private Optional routes;
    @SerializedName("status") private Optional status;
    @SerializedName("symmetricRouteRules") private Optional symmetricRouteRules;
    @SerializedName("upAndRunning") private Optional upAndRunning;
    @SerializedName("bond-xmit_hash_policy") private Optional bondXmitHashPolicy;
    @SerializedName("bond-ad_num_ports") private Optional bondAdNumPorts;
    // empty constructor
    @Since("7.0")
    public NetworkConfig() {}

    
    // parameterized constructor
    @Since("7.0")
    public NetworkConfig(
        Optional _default,
        Optional bondMaster,
        Optional virtualNetworkTag,
        Optional address,
        Optional auto,
        Optional bondDowndelay,
        Optional bondFailOverMac,
        Optional bondPrimaryReselect,
        Optional bondLacpRate,
        Optional bondMiimon,
        Optional bondMode,
        Optional bondSlaves,
        Optional bondUpdelay,
        Optional dnsNameservers,
        Optional dnsSearch,
        Optional family,
        Optional gateway,
        Optional macAddress,
        Optional macAddressPermanent,
        Optional method,
        Optional mtu,
        Optional netmask,
        Optional network,
        Optional physical,
        Optional routes,
        Optional status,
        Optional symmetricRouteRules,
        Optional upAndRunning,
        Optional bondXmitHashPolicy,
        Optional bondAdNumPorts
    )
    {
        this._default = (_default == null) ? Optional.empty() : _default;
        this.bondMaster = (bondMaster == null) ? Optional.empty() : bondMaster;
        this.virtualNetworkTag = (virtualNetworkTag == null) ? Optional.empty() : virtualNetworkTag;
        this.address = (address == null) ? Optional.empty() : address;
        this.auto = (auto == null) ? Optional.empty() : auto;
        this.bondDowndelay = (bondDowndelay == null) ? Optional.empty() : bondDowndelay;
        this.bondFailOverMac = (bondFailOverMac == null) ? Optional.empty() : bondFailOverMac;
        this.bondPrimaryReselect = (bondPrimaryReselect == null) ? Optional.empty() : bondPrimaryReselect;
        this.bondLacpRate = (bondLacpRate == null) ? Optional.empty() : bondLacpRate;
        this.bondMiimon = (bondMiimon == null) ? Optional.empty() : bondMiimon;
        this.bondMode = (bondMode == null) ? Optional.empty() : bondMode;
        this.bondSlaves = (bondSlaves == null) ? Optional.empty() : bondSlaves;
        this.bondUpdelay = (bondUpdelay == null) ? Optional.empty() : bondUpdelay;
        this.dnsNameservers = (dnsNameservers == null) ? Optional.empty() : dnsNameservers;
        this.dnsSearch = (dnsSearch == null) ? Optional.empty() : dnsSearch;
        this.family = (family == null) ? Optional.empty() : family;
        this.gateway = (gateway == null) ? Optional.empty() : gateway;
        this.macAddress = (macAddress == null) ? Optional.empty() : macAddress;
        this.macAddressPermanent = (macAddressPermanent == null) ? Optional.empty() : macAddressPermanent;
        this.method = (method == null) ? Optional.empty() : method;
        this.mtu = (mtu == null) ? Optional.empty() : mtu;
        this.netmask = (netmask == null) ? Optional.empty() : netmask;
        this.network = (network == null) ? Optional.empty() : network;
        this.physical = (physical == null) ? Optional.empty() : physical;
        this.routes = (routes == null) ? Optional.empty() : routes;
        this.status = (status == null) ? Optional.empty() : status;
        this.symmetricRouteRules = (symmetricRouteRules == null) ? Optional.empty() : symmetricRouteRules;
        this.upAndRunning = (upAndRunning == null) ? Optional.empty() : upAndRunning;
        this.bondXmitHashPolicy = (bondXmitHashPolicy == null) ? Optional.empty() : bondXmitHashPolicy;
        this.bondAdNumPorts = (bondAdNumPorts == null) ? Optional.empty() : bondAdNumPorts;
    }

    /** 
     * 
     **/
    public Optional get_default() { return this._default; }
   
    public void set_default(Optional _default) { 
        this._default = (_default == null) ? Optional.empty() : _default;
    }
    /** 
     * 
     **/
    public Optional getBondMaster() { return this.bondMaster; }
   
    public void setBondMaster(Optional bondMaster) { 
        this.bondMaster = (bondMaster == null) ? Optional.empty() : bondMaster;
    }
    /** 
     * 
     **/
    public Optional getVirtualNetworkTag() { return this.virtualNetworkTag; }
   
    public void setVirtualNetworkTag(Optional virtualNetworkTag) { 
        this.virtualNetworkTag = (virtualNetworkTag == null) ? Optional.empty() : virtualNetworkTag;
    }
    /** 
     * 
     **/
    public Optional getAddress() { return this.address; }
   
    public void setAddress(Optional address) { 
        this.address = (address == null) ? Optional.empty() : address;
    }
    /** 
     * 
     **/
    public Optional getAuto() { return this.auto; }
   
    public void setAuto(Optional auto) { 
        this.auto = (auto == null) ? Optional.empty() : auto;
    }
    /** 
     * 
     **/
    public Optional getBondDowndelay() { return this.bondDowndelay; }
   
    public void setBondDowndelay(Optional bondDowndelay) { 
        this.bondDowndelay = (bondDowndelay == null) ? Optional.empty() : bondDowndelay;
    }
    /** 
     * 
     **/
    public Optional getBondFailOverMac() { return this.bondFailOverMac; }
   
    public void setBondFailOverMac(Optional bondFailOverMac) { 
        this.bondFailOverMac = (bondFailOverMac == null) ? Optional.empty() : bondFailOverMac;
    }
    /** 
     * 
     **/
    public Optional getBondPrimaryReselect() { return this.bondPrimaryReselect; }
   
    public void setBondPrimaryReselect(Optional bondPrimaryReselect) { 
        this.bondPrimaryReselect = (bondPrimaryReselect == null) ? Optional.empty() : bondPrimaryReselect;
    }
    /** 
     * 
     **/
    public Optional getBondLacpRate() { return this.bondLacpRate; }
   
    public void setBondLacpRate(Optional bondLacpRate) { 
        this.bondLacpRate = (bondLacpRate == null) ? Optional.empty() : bondLacpRate;
    }
    /** 
     * 
     **/
    public Optional getBondMiimon() { return this.bondMiimon; }
   
    public void setBondMiimon(Optional bondMiimon) { 
        this.bondMiimon = (bondMiimon == null) ? Optional.empty() : bondMiimon;
    }
    /** 
     * 
     **/
    public Optional getBondMode() { return this.bondMode; }
   
    public void setBondMode(Optional bondMode) { 
        this.bondMode = (bondMode == null) ? Optional.empty() : bondMode;
    }
    /** 
     * 
     **/
    public Optional getBondSlaves() { return this.bondSlaves; }
   
    public void setBondSlaves(Optional bondSlaves) { 
        this.bondSlaves = (bondSlaves == null) ? Optional.empty() : bondSlaves;
    }
    /** 
     * 
     **/
    public Optional getBondUpdelay() { return this.bondUpdelay; }
   
    public void setBondUpdelay(Optional bondUpdelay) { 
        this.bondUpdelay = (bondUpdelay == null) ? Optional.empty() : bondUpdelay;
    }
    /** 
     * 
     **/
    public Optional getDnsNameservers() { return this.dnsNameservers; }
   
    public void setDnsNameservers(Optional dnsNameservers) { 
        this.dnsNameservers = (dnsNameservers == null) ? Optional.empty() : dnsNameservers;
    }
    /** 
     * 
     **/
    public Optional getDnsSearch() { return this.dnsSearch; }
   
    public void setDnsSearch(Optional dnsSearch) { 
        this.dnsSearch = (dnsSearch == null) ? Optional.empty() : dnsSearch;
    }
    /** 
     * 
     **/
    public Optional getFamily() { return this.family; }
   
    public void setFamily(Optional family) { 
        this.family = (family == null) ? Optional.empty() : family;
    }
    /** 
     * 
     **/
    public Optional getGateway() { return this.gateway; }
   
    public void setGateway(Optional gateway) { 
        this.gateway = (gateway == null) ? Optional.empty() : gateway;
    }
    /** 
     * 
     **/
    public Optional getMacAddress() { return this.macAddress; }
   
    public void setMacAddress(Optional macAddress) { 
        this.macAddress = (macAddress == null) ? Optional.empty() : macAddress;
    }
    /** 
     * 
     **/
    public Optional getMacAddressPermanent() { return this.macAddressPermanent; }
   
    public void setMacAddressPermanent(Optional macAddressPermanent) { 
        this.macAddressPermanent = (macAddressPermanent == null) ? Optional.empty() : macAddressPermanent;
    }
    /** 
     * 
     **/
    public Optional getMethod() { return this.method; }
   
    public void setMethod(Optional method) { 
        this.method = (method == null) ? Optional.empty() : method;
    }
    /** 
     * 
     **/
    public Optional getMtu() { return this.mtu; }
   
    public void setMtu(Optional mtu) { 
        this.mtu = (mtu == null) ? Optional.empty() : mtu;
    }
    /** 
     * 
     **/
    public Optional getNetmask() { return this.netmask; }
   
    public void setNetmask(Optional netmask) { 
        this.netmask = (netmask == null) ? Optional.empty() : netmask;
    }
    /** 
     * 
     **/
    public Optional getNetwork() { return this.network; }
   
    public void setNetwork(Optional network) { 
        this.network = (network == null) ? Optional.empty() : network;
    }
    /** 
     * 
     **/
    public Optional getPhysical() { return this.physical; }
   
    public void setPhysical(Optional physical) { 
        this.physical = (physical == null) ? Optional.empty() : physical;
    }
    /** 
     * 
     **/
    public Optional getRoutes() { return this.routes; }
   
    public void setRoutes(Optional routes) { 
        this.routes = (routes == null) ? Optional.empty() : routes;
    }
    /** 
     * 
     **/
    public Optional getStatus() { return this.status; }
   
    public void setStatus(Optional status) { 
        this.status = (status == null) ? Optional.empty() : status;
    }
    /** 
     * 
     **/
    public Optional getSymmetricRouteRules() { return this.symmetricRouteRules; }
   
    public void setSymmetricRouteRules(Optional symmetricRouteRules) { 
        this.symmetricRouteRules = (symmetricRouteRules == null) ? Optional.empty() : symmetricRouteRules;
    }
    /** 
     * 
     **/
    public Optional getUpAndRunning() { return this.upAndRunning; }
   
    public void setUpAndRunning(Optional upAndRunning) { 
        this.upAndRunning = (upAndRunning == null) ? Optional.empty() : upAndRunning;
    }
    /** 
     * 
     **/
    public Optional getBondXmitHashPolicy() { return this.bondXmitHashPolicy; }
   
    public void setBondXmitHashPolicy(Optional bondXmitHashPolicy) { 
        this.bondXmitHashPolicy = (bondXmitHashPolicy == null) ? Optional.empty() : bondXmitHashPolicy;
    }
    /** 
     * 
     **/
    public Optional getBondAdNumPorts() { return this.bondAdNumPorts; }
   
    public void setBondAdNumPorts(Optional bondAdNumPorts) { 
        this.bondAdNumPorts = (bondAdNumPorts == null) ? Optional.empty() : bondAdNumPorts;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        NetworkConfig that = (NetworkConfig) o;

        return 
            Objects.equals(_default, that._default) && 
            Objects.equals(bondMaster, that.bondMaster) && 
            Objects.equals(virtualNetworkTag, that.virtualNetworkTag) && 
            Objects.equals(address, that.address) && 
            Objects.equals(auto, that.auto) && 
            Objects.equals(bondDowndelay, that.bondDowndelay) && 
            Objects.equals(bondFailOverMac, that.bondFailOverMac) && 
            Objects.equals(bondPrimaryReselect, that.bondPrimaryReselect) && 
            Objects.equals(bondLacpRate, that.bondLacpRate) && 
            Objects.equals(bondMiimon, that.bondMiimon) && 
            Objects.equals(bondMode, that.bondMode) && 
            Objects.equals(bondSlaves, that.bondSlaves) && 
            Objects.equals(bondUpdelay, that.bondUpdelay) && 
            Objects.equals(dnsNameservers, that.dnsNameservers) && 
            Objects.equals(dnsSearch, that.dnsSearch) && 
            Objects.equals(family, that.family) && 
            Objects.equals(gateway, that.gateway) && 
            Objects.equals(macAddress, that.macAddress) && 
            Objects.equals(macAddressPermanent, that.macAddressPermanent) && 
            Objects.equals(method, that.method) && 
            Objects.equals(mtu, that.mtu) && 
            Objects.equals(netmask, that.netmask) && 
            Objects.equals(network, that.network) && 
            Objects.equals(physical, that.physical) && 
            Objects.equals(routes, that.routes) && 
            Objects.equals(status, that.status) && 
            Objects.equals(symmetricRouteRules, that.symmetricRouteRules) && 
            Objects.equals(upAndRunning, that.upAndRunning) && 
            Objects.equals(bondXmitHashPolicy, that.bondXmitHashPolicy) && 
            Objects.equals(bondAdNumPorts, that.bondAdNumPorts);
    }

    @Override
    public int hashCode() {
        return Objects.hash( _default,bondMaster,virtualNetworkTag,address,auto,bondDowndelay,bondFailOverMac,bondPrimaryReselect,bondLacpRate,bondMiimon,bondMode,bondSlaves,bondUpdelay,dnsNameservers,dnsSearch,family,gateway,macAddress,macAddressPermanent,method,mtu,netmask,network,physical,routes,status,symmetricRouteRules,upAndRunning,bondXmitHashPolicy,bondAdNumPorts );
    }


    public java.util.Map toMap() {
        java.util.Map map = new HashMap<>();
        map.put("_default", _default);
        map.put("bondMaster", bondMaster);
        map.put("virtualNetworkTag", virtualNetworkTag);
        map.put("address", address);
        map.put("auto", auto);
        map.put("bondDowndelay", bondDowndelay);
        map.put("bondFailOverMac", bondFailOverMac);
        map.put("bondPrimaryReselect", bondPrimaryReselect);
        map.put("bondLacpRate", bondLacpRate);
        map.put("bondMiimon", bondMiimon);
        map.put("bondMode", bondMode);
        map.put("bondSlaves", bondSlaves);
        map.put("bondUpdelay", bondUpdelay);
        map.put("dnsNameservers", dnsNameservers);
        map.put("dnsSearch", dnsSearch);
        map.put("family", family);
        map.put("gateway", gateway);
        map.put("macAddress", macAddress);
        map.put("macAddressPermanent", macAddressPermanent);
        map.put("method", method);
        map.put("mtu", mtu);
        map.put("netmask", netmask);
        map.put("network", network);
        map.put("physical", physical);
        map.put("routes", routes);
        map.put("status", status);
        map.put("symmetricRouteRules", symmetricRouteRules);
        map.put("upAndRunning", upAndRunning);
        map.put("bondXmitHashPolicy", bondXmitHashPolicy);
        map.put("bondAdNumPorts", bondAdNumPorts);
        return map;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        Gson gson = new Gson();
        sb.append( "{ " );

        if(null != _default && _default.isPresent()){
            sb.append(" _default : ").append(gson.toJson(_default)).append(",");
        }
        else{
            sb.append(" _default : ").append("null").append(",");
        }
        if(null != bondMaster && bondMaster.isPresent()){
            sb.append(" bondMaster : ").append(gson.toJson(bondMaster)).append(",");
        }
        else{
            sb.append(" bondMaster : ").append("null").append(",");
        }
        if(null != virtualNetworkTag && virtualNetworkTag.isPresent()){
            sb.append(" virtualNetworkTag : ").append(gson.toJson(virtualNetworkTag)).append(",");
        }
        else{
            sb.append(" virtualNetworkTag : ").append("null").append(",");
        }
        if(null != address && address.isPresent()){
            sb.append(" address : ").append(gson.toJson(address)).append(",");
        }
        else{
            sb.append(" address : ").append("null").append(",");
        }
        if(null != auto && auto.isPresent()){
            sb.append(" auto : ").append(gson.toJson(auto)).append(",");
        }
        else{
            sb.append(" auto : ").append("null").append(",");
        }
        if(null != bondDowndelay && bondDowndelay.isPresent()){
            sb.append(" bondDowndelay : ").append(gson.toJson(bondDowndelay)).append(",");
        }
        else{
            sb.append(" bondDowndelay : ").append("null").append(",");
        }
        if(null != bondFailOverMac && bondFailOverMac.isPresent()){
            sb.append(" bondFailOverMac : ").append(gson.toJson(bondFailOverMac)).append(",");
        }
        else{
            sb.append(" bondFailOverMac : ").append("null").append(",");
        }
        if(null != bondPrimaryReselect && bondPrimaryReselect.isPresent()){
            sb.append(" bondPrimaryReselect : ").append(gson.toJson(bondPrimaryReselect)).append(",");
        }
        else{
            sb.append(" bondPrimaryReselect : ").append("null").append(",");
        }
        if(null != bondLacpRate && bondLacpRate.isPresent()){
            sb.append(" bondLacpRate : ").append(gson.toJson(bondLacpRate)).append(",");
        }
        else{
            sb.append(" bondLacpRate : ").append("null").append(",");
        }
        if(null != bondMiimon && bondMiimon.isPresent()){
            sb.append(" bondMiimon : ").append(gson.toJson(bondMiimon)).append(",");
        }
        else{
            sb.append(" bondMiimon : ").append("null").append(",");
        }
        if(null != bondMode && bondMode.isPresent()){
            sb.append(" bondMode : ").append(gson.toJson(bondMode)).append(",");
        }
        else{
            sb.append(" bondMode : ").append("null").append(",");
        }
        if(null != bondSlaves && bondSlaves.isPresent()){
            sb.append(" bondSlaves : ").append(gson.toJson(bondSlaves)).append(",");
        }
        else{
            sb.append(" bondSlaves : ").append("null").append(",");
        }
        if(null != bondUpdelay && bondUpdelay.isPresent()){
            sb.append(" bondUpdelay : ").append(gson.toJson(bondUpdelay)).append(",");
        }
        else{
            sb.append(" bondUpdelay : ").append("null").append(",");
        }
        if(null != dnsNameservers && dnsNameservers.isPresent()){
            sb.append(" dnsNameservers : ").append(gson.toJson(dnsNameservers)).append(",");
        }
        else{
            sb.append(" dnsNameservers : ").append("null").append(",");
        }
        if(null != dnsSearch && dnsSearch.isPresent()){
            sb.append(" dnsSearch : ").append(gson.toJson(dnsSearch)).append(",");
        }
        else{
            sb.append(" dnsSearch : ").append("null").append(",");
        }
        if(null != family && family.isPresent()){
            sb.append(" family : ").append(gson.toJson(family)).append(",");
        }
        else{
            sb.append(" family : ").append("null").append(",");
        }
        if(null != gateway && gateway.isPresent()){
            sb.append(" gateway : ").append(gson.toJson(gateway)).append(",");
        }
        else{
            sb.append(" gateway : ").append("null").append(",");
        }
        if(null != macAddress && macAddress.isPresent()){
            sb.append(" macAddress : ").append(gson.toJson(macAddress)).append(",");
        }
        else{
            sb.append(" macAddress : ").append("null").append(",");
        }
        if(null != macAddressPermanent && macAddressPermanent.isPresent()){
            sb.append(" macAddressPermanent : ").append(gson.toJson(macAddressPermanent)).append(",");
        }
        else{
            sb.append(" macAddressPermanent : ").append("null").append(",");
        }
        if(null != method && method.isPresent()){
            sb.append(" method : ").append(gson.toJson(method)).append(",");
        }
        else{
            sb.append(" method : ").append("null").append(",");
        }
        if(null != mtu && mtu.isPresent()){
            sb.append(" mtu : ").append(gson.toJson(mtu)).append(",");
        }
        else{
            sb.append(" mtu : ").append("null").append(",");
        }
        if(null != netmask && netmask.isPresent()){
            sb.append(" netmask : ").append(gson.toJson(netmask)).append(",");
        }
        else{
            sb.append(" netmask : ").append("null").append(",");
        }
        if(null != network && network.isPresent()){
            sb.append(" network : ").append(gson.toJson(network)).append(",");
        }
        else{
            sb.append(" network : ").append("null").append(",");
        }
        if(null != physical && physical.isPresent()){
            sb.append(" physical : ").append(gson.toJson(physical)).append(",");
        }
        else{
            sb.append(" physical : ").append("null").append(",");
        }
        if(null != routes && routes.isPresent()){
            sb.append(" routes : ").append(gson.toJson(routes)).append(",");
        }
        else{
            sb.append(" routes : ").append("null").append(",");
        }
        if(null != status && status.isPresent()){
            sb.append(" status : ").append(gson.toJson(status)).append(",");
        }
        else{
            sb.append(" status : ").append("null").append(",");
        }
        if(null != symmetricRouteRules && symmetricRouteRules.isPresent()){
            sb.append(" symmetricRouteRules : ").append(gson.toJson(symmetricRouteRules)).append(",");
        }
        else{
            sb.append(" symmetricRouteRules : ").append("null").append(",");
        }
        if(null != upAndRunning && upAndRunning.isPresent()){
            sb.append(" upAndRunning : ").append(gson.toJson(upAndRunning)).append(",");
        }
        else{
            sb.append(" upAndRunning : ").append("null").append(",");
        }
        if(null != bondXmitHashPolicy && bondXmitHashPolicy.isPresent()){
            sb.append(" bondXmitHashPolicy : ").append(gson.toJson(bondXmitHashPolicy)).append(",");
        }
        else{
            sb.append(" bondXmitHashPolicy : ").append("null").append(",");
        }
        if(null != bondAdNumPorts && bondAdNumPorts.isPresent()){
            sb.append(" bondAdNumPorts : ").append(gson.toJson(bondAdNumPorts)).append(",");
        }
        else{
            sb.append(" bondAdNumPorts : ").append("null").append(",");
        }
        sb.append( " }" );

        if(sb.lastIndexOf(", }") != -1)
            sb.deleteCharAt(sb.lastIndexOf(", }"));

        return sb.toString();
    }

    public static Builder builder() {
        return new Builder();
    }

    public final Builder asBuilder() {
        return new Builder().buildFrom(this);
    }

    public static class Builder {
        private Optional _default;
        private Optional bondMaster;
        private Optional virtualNetworkTag;
        private Optional address;
        private Optional auto;
        private Optional bondDowndelay;
        private Optional bondFailOverMac;
        private Optional bondPrimaryReselect;
        private Optional bondLacpRate;
        private Optional bondMiimon;
        private Optional bondMode;
        private Optional bondSlaves;
        private Optional bondUpdelay;
        private Optional dnsNameservers;
        private Optional dnsSearch;
        private Optional family;
        private Optional gateway;
        private Optional macAddress;
        private Optional macAddressPermanent;
        private Optional method;
        private Optional mtu;
        private Optional netmask;
        private Optional network;
        private Optional physical;
        private Optional routes;
        private Optional status;
        private Optional symmetricRouteRules;
        private Optional upAndRunning;
        private Optional bondXmitHashPolicy;
        private Optional bondAdNumPorts;

        private Builder() { }

        public NetworkConfig build() {
            return new NetworkConfig (
                         this._default,
                         this.bondMaster,
                         this.virtualNetworkTag,
                         this.address,
                         this.auto,
                         this.bondDowndelay,
                         this.bondFailOverMac,
                         this.bondPrimaryReselect,
                         this.bondLacpRate,
                         this.bondMiimon,
                         this.bondMode,
                         this.bondSlaves,
                         this.bondUpdelay,
                         this.dnsNameservers,
                         this.dnsSearch,
                         this.family,
                         this.gateway,
                         this.macAddress,
                         this.macAddressPermanent,
                         this.method,
                         this.mtu,
                         this.netmask,
                         this.network,
                         this.physical,
                         this.routes,
                         this.status,
                         this.symmetricRouteRules,
                         this.upAndRunning,
                         this.bondXmitHashPolicy,
                         this.bondAdNumPorts);
        }

        private NetworkConfig.Builder buildFrom(final NetworkConfig req) {
            this._default = req._default;
            this.bondMaster = req.bondMaster;
            this.virtualNetworkTag = req.virtualNetworkTag;
            this.address = req.address;
            this.auto = req.auto;
            this.bondDowndelay = req.bondDowndelay;
            this.bondFailOverMac = req.bondFailOverMac;
            this.bondPrimaryReselect = req.bondPrimaryReselect;
            this.bondLacpRate = req.bondLacpRate;
            this.bondMiimon = req.bondMiimon;
            this.bondMode = req.bondMode;
            this.bondSlaves = req.bondSlaves;
            this.bondUpdelay = req.bondUpdelay;
            this.dnsNameservers = req.dnsNameservers;
            this.dnsSearch = req.dnsSearch;
            this.family = req.family;
            this.gateway = req.gateway;
            this.macAddress = req.macAddress;
            this.macAddressPermanent = req.macAddressPermanent;
            this.method = req.method;
            this.mtu = req.mtu;
            this.netmask = req.netmask;
            this.network = req.network;
            this.physical = req.physical;
            this.routes = req.routes;
            this.status = req.status;
            this.symmetricRouteRules = req.symmetricRouteRules;
            this.upAndRunning = req.upAndRunning;
            this.bondXmitHashPolicy = req.bondXmitHashPolicy;
            this.bondAdNumPorts = req.bondAdNumPorts;

            return this;
        }

        public NetworkConfig.Builder optional_default(final Boolean _default) {
            this._default = (_default == null) ? Optional.empty() : Optional.of(_default);
            return this;
        }

        public NetworkConfig.Builder optionalBondMaster(final String bondMaster) {
            this.bondMaster = (bondMaster == null) ? Optional.empty() : Optional.of(bondMaster);
            return this;
        }

        public NetworkConfig.Builder optionalVirtualNetworkTag(final String virtualNetworkTag) {
            this.virtualNetworkTag = (virtualNetworkTag == null) ? Optional.empty() : Optional.of(virtualNetworkTag);
            return this;
        }

        public NetworkConfig.Builder optionalAddress(final String address) {
            this.address = (address == null) ? Optional.empty() : Optional.of(address);
            return this;
        }

        public NetworkConfig.Builder optionalAuto(final Boolean auto) {
            this.auto = (auto == null) ? Optional.empty() : Optional.of(auto);
            return this;
        }

        public NetworkConfig.Builder optionalBondDowndelay(final String bondDowndelay) {
            this.bondDowndelay = (bondDowndelay == null) ? Optional.empty() : Optional.of(bondDowndelay);
            return this;
        }

        public NetworkConfig.Builder optionalBondFailOverMac(final String bondFailOverMac) {
            this.bondFailOverMac = (bondFailOverMac == null) ? Optional.empty() : Optional.of(bondFailOverMac);
            return this;
        }

        public NetworkConfig.Builder optionalBondPrimaryReselect(final String bondPrimaryReselect) {
            this.bondPrimaryReselect = (bondPrimaryReselect == null) ? Optional.empty() : Optional.of(bondPrimaryReselect);
            return this;
        }

        public NetworkConfig.Builder optionalBondLacpRate(final String bondLacpRate) {
            this.bondLacpRate = (bondLacpRate == null) ? Optional.empty() : Optional.of(bondLacpRate);
            return this;
        }

        public NetworkConfig.Builder optionalBondMiimon(final String bondMiimon) {
            this.bondMiimon = (bondMiimon == null) ? Optional.empty() : Optional.of(bondMiimon);
            return this;
        }

        public NetworkConfig.Builder optionalBondMode(final String bondMode) {
            this.bondMode = (bondMode == null) ? Optional.empty() : Optional.of(bondMode);
            return this;
        }

        public NetworkConfig.Builder optionalBondSlaves(final String bondSlaves) {
            this.bondSlaves = (bondSlaves == null) ? Optional.empty() : Optional.of(bondSlaves);
            return this;
        }

        public NetworkConfig.Builder optionalBondUpdelay(final String bondUpdelay) {
            this.bondUpdelay = (bondUpdelay == null) ? Optional.empty() : Optional.of(bondUpdelay);
            return this;
        }

        public NetworkConfig.Builder optionalDnsNameservers(final String dnsNameservers) {
            this.dnsNameservers = (dnsNameservers == null) ? Optional.empty() : Optional.of(dnsNameservers);
            return this;
        }

        public NetworkConfig.Builder optionalDnsSearch(final String dnsSearch) {
            this.dnsSearch = (dnsSearch == null) ? Optional.empty() : Optional.of(dnsSearch);
            return this;
        }

        public NetworkConfig.Builder optionalFamily(final String family) {
            this.family = (family == null) ? Optional.empty() : Optional.of(family);
            return this;
        }

        public NetworkConfig.Builder optionalGateway(final String gateway) {
            this.gateway = (gateway == null) ? Optional.empty() : Optional.of(gateway);
            return this;
        }

        public NetworkConfig.Builder optionalMacAddress(final String macAddress) {
            this.macAddress = (macAddress == null) ? Optional.empty() : Optional.of(macAddress);
            return this;
        }

        public NetworkConfig.Builder optionalMacAddressPermanent(final String macAddressPermanent) {
            this.macAddressPermanent = (macAddressPermanent == null) ? Optional.empty() : Optional.of(macAddressPermanent);
            return this;
        }

        public NetworkConfig.Builder optionalMethod(final String method) {
            this.method = (method == null) ? Optional.empty() : Optional.of(method);
            return this;
        }

        public NetworkConfig.Builder optionalMtu(final String mtu) {
            this.mtu = (mtu == null) ? Optional.empty() : Optional.of(mtu);
            return this;
        }

        public NetworkConfig.Builder optionalNetmask(final String netmask) {
            this.netmask = (netmask == null) ? Optional.empty() : Optional.of(netmask);
            return this;
        }

        public NetworkConfig.Builder optionalNetwork(final String network) {
            this.network = (network == null) ? Optional.empty() : Optional.of(network);
            return this;
        }

        public NetworkConfig.Builder optionalPhysical(final PhysicalAdapter physical) {
            this.physical = (physical == null) ? Optional.empty() : Optional.of(physical);
            return this;
        }

        public NetworkConfig.Builder optionalRoutes(final Attributes[] routes) {
            this.routes = (routes == null) ? Optional.empty() : Optional.of(routes);
            return this;
        }

        public NetworkConfig.Builder optionalStatus(final String status) {
            this.status = (status == null) ? Optional.empty() : Optional.of(status);
            return this;
        }

        public NetworkConfig.Builder optionalSymmetricRouteRules(final String[] symmetricRouteRules) {
            this.symmetricRouteRules = (symmetricRouteRules == null) ? Optional.empty() : Optional.of(symmetricRouteRules);
            return this;
        }

        public NetworkConfig.Builder optionalUpAndRunning(final Boolean upAndRunning) {
            this.upAndRunning = (upAndRunning == null) ? Optional.empty() : Optional.of(upAndRunning);
            return this;
        }

        public NetworkConfig.Builder optionalBondXmitHashPolicy(final String bondXmitHashPolicy) {
            this.bondXmitHashPolicy = (bondXmitHashPolicy == null) ? Optional.empty() : Optional.of(bondXmitHashPolicy);
            return this;
        }

        public NetworkConfig.Builder optionalBondAdNumPorts(final String bondAdNumPorts) {
            this.bondAdNumPorts = (bondAdNumPorts == null) ? Optional.empty() : Optional.of(bondAdNumPorts);
            return this;
        }

    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy