Use this API to add snmpmanager resources.
332140
public static base_responses add(nitro_service client, snmpmanager resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			snmpmanager addresources[] = new snmpmanager[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new snmpmanager();
				addresources[i].ipaddress = resources[i].ipaddress;
				addresources[i].netmask = resources[i].netmask;
				addresources[i].domainresolveretry = resources[i].domainresolveretry;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
902392
def add(self, resource, replace=False):
        """"""
        uri = resource.uri
        for r in self:
            if (uri == r.uri):
                if (replace):
                    r = resource
                    return
                else:
                    raise ResourceListDupeError(
                        "Attempt to add resource already in resource_list")
        # didn't find it in list, add to end
        self.append(resource)
1188503
public static snmpmanager[] get(nitro_service service) throws Exception{
		snmpmanager obj = new snmpmanager();
		snmpmanager[] response = (snmpmanager[])obj.get_resources(service);
		return response;
	}
678540
public static base_responses update(nitro_service client, snmpuser resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			snmpuser updateresources[] = new snmpuser[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new snmpuser();
				updateresources[i].name = resources[i].name;
				updateresources[i].group = resources[i].group;
				updateresources[i].authtype = resources[i].authtype;
				updateresources[i].authpasswd = resources[i].authpasswd;
				updateresources[i].privtype = resources[i].privtype;
				updateresources[i].privpasswd = resources[i].privpasswd;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
1201358
public UriMappingResolver addResources(String... resources) {
        if (resources.length % 2 == 1) {
            throw new IllegalArgumentException
                    ("Expected even number of arguments");
        }
        for (int i = 0; i < resources.length; i += 2) {
            addSchema(resources[i], resources[i+1]);
        }
        return this;
    }
1227066
public static base_response update(nitro_service client, snmpgroup resource) throws Exception {
		snmpgroup updateresource = new snmpgroup();
		updateresource.name = resource.name;
		updateresource.securitylevel = resource.securitylevel;
		updateresource.readviewname = resource.readviewname;
		return updateresource.update_resource(client);
	}
1320750
public static base_responses add(nitro_service client, snmpcommunity resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			snmpcommunity addresources[] = new snmpcommunity[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new snmpcommunity();
				addresources[i].communityname = resources[i].communityname;
				addresources[i].permissions = resources[i].permissions;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
980434
public static base_response add(nitro_service client, nspbr resource) throws Exception {
		nspbr addresource = new nspbr();
		addresource.name = resource.name;
		addresource.action = resource.action;
		addresource.td = resource.td;
		addresource.srcip = resource.srcip;
		addresource.srcipop = resource.srcipop;
		addresource.srcipval = resource.srcipval;
		addresource.srcport = resource.srcport;
		addresource.srcportop = resource.srcportop;
		addresource.srcportval = resource.srcportval;
		addresource.destip = resource.destip;
		addresource.destipop = resource.destipop;
		addresource.destipval = resource.destipval;
		addresource.destport = resource.destport;
		addresource.destportop = resource.destportop;
		addresource.destportval = resource.destportval;
		addresource.nexthop = resource.nexthop;
		addresource.nexthopval = resource.nexthopval;
		addresource.iptunnel = resource.iptunnel;
		addresource.iptunnelname = resource.iptunnelname;
		addresource.srcmac = resource.srcmac;
		addresource.protocol = resource.protocol;
		addresource.protocolnumber = resource.protocolnumber;
		addresource.vlan = resource.vlan;
		addresource.Interface = resource.Interface;
		addresource.priority = resource.priority;
		addresource.msr = resource.msr;
		addresource.monitor = resource.monitor;
		addresource.state = resource.state;
		return addresource.add_resource(client);
	}
1091403
public static base_responses add(nitro_service client, service resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			service addresources[] = new service[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new service();
				addresources[i].name = resources[i].name;
				addresources[i].ip = resources[i].ip;
				addresources[i].servername = resources[i].servername;
				addresources[i].servicetype = resources[i].servicetype;
				addresources[i].port = resources[i].port;
				addresources[i].cleartextport = resources[i].cleartextport;
				addresources[i].cachetype = resources[i].cachetype;
				addresources[i].maxclient = resources[i].maxclient;
				addresources[i].healthmonitor = resources[i].healthmonitor;
				addresources[i].maxreq = resources[i].maxreq;
				addresources[i].cacheable = resources[i].cacheable;
				addresources[i].cip = resources[i].cip;
				addresources[i].cipheader = resources[i].cipheader;
				addresources[i].usip = resources[i].usip;
				addresources[i].pathmonitor = resources[i].pathmonitor;
				addresources[i].pathmonitorindv = resources[i].pathmonitorindv;
				addresources[i].useproxyport = resources[i].useproxyport;
				addresources[i].sc = resources[i].sc;
				addresources[i].sp = resources[i].sp;
				addresources[i].rtspsessionidremap = resources[i].rtspsessionidremap;
				addresources[i].clttimeout = resources[i].clttimeout;
				addresources[i].svrtimeout = resources[i].svrtimeout;
				addresources[i].customserverid = resources[i].customserverid;
				addresources[i].serverid = resources[i].serverid;
				addresources[i].cka = resources[i].cka;
				addresources[i].tcpb = resources[i].tcpb;
				addresources[i].cmp = resources[i].cmp;
				addresources[i].maxbandwidth = resources[i].maxbandwidth;
				addresources[i].accessdown = resources[i].accessdown;
				addresources[i].monthreshold = resources[i].monthreshold;
				addresources[i].state = resources[i].state;
				addresources[i].downstateflush = resources[i].downstateflush;
				addresources[i].tcpprofilename = resources[i].tcpprofilename;
				addresources[i].httpprofilename = resources[i].httpprofilename;
				addresources[i].hashid = resources[i].hashid;
				addresources[i].comment = resources[i].comment;
				addresources[i].appflowlog = resources[i].appflowlog;
				addresources[i].netprofile = resources[i].netprofile;
				addresources[i].td = resources[i].td;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
1263899
public static base_response add(nitro_service client, route resource) throws Exception {
		route addresource = new route();
		addresource.network = resource.network;
		addresource.netmask = resource.netmask;
		addresource.gateway = resource.gateway;
		addresource.cost = resource.cost;
		addresource.td = resource.td;
		addresource.distance = resource.distance;
		addresource.cost1 = resource.cost1;
		addresource.weight = resource.weight;
		addresource.advertise = resource.advertise;
		addresource.protocol = resource.protocol;
		addresource.msr = resource.msr;
		addresource.monitor = resource.monitor;
		return addresource.add_resource(client);
	}
180683
public static base_responses add(nitro_service client, vpnvserver resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			vpnvserver addresources[] = new vpnvserver[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new vpnvserver();
				addresources[i].name = resources[i].name;
				addresources[i].servicetype = resources[i].servicetype;
				addresources[i].ipv46 = resources[i].ipv46;
				addresources[i].range = resources[i].range;
				addresources[i].port = resources[i].port;
				addresources[i].state = resources[i].state;
				addresources[i].authentication = resources[i].authentication;
				addresources[i].doublehop = resources[i].doublehop;
				addresources[i].maxaaausers = resources[i].maxaaausers;
				addresources[i].icaonly = resources[i].icaonly;
				addresources[i].downstateflush = resources[i].downstateflush;
				addresources[i].listenpolicy = resources[i].listenpolicy;
				addresources[i].listenpriority = resources[i].listenpriority;
				addresources[i].tcpprofilename = resources[i].tcpprofilename;
				addresources[i].httpprofilename = resources[i].httpprofilename;
				addresources[i].comment = resources[i].comment;
				addresources[i].appflowlog = resources[i].appflowlog;
				addresources[i].icmpvsrresponse = resources[i].icmpvsrresponse;
				addresources[i].netprofile = resources[i].netprofile;
				addresources[i].cginfrahomepageredirect = resources[i].cginfrahomepageredirect;
				addresources[i].maxloginattempts = resources[i].maxloginattempts;
				addresources[i].failedlogintimeout = resources[i].failedlogintimeout;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
1274290
@Override
	public Result<Void> addAdminToNS(AuthzTrans trans, HttpServletResponse resp, String ns, String id) {
		TimeTaken tt = trans.start(ADD_NS_ADMIN + ' ' + ns + ' ' + id, Env.SUB|Env.ALWAYS);
		try {
			Result<Void> rp = service.addAdminNS(trans,ns,id);
			switch(rp.status) {
				case OK: 
					//TODO Perms??
					setContentType(resp,nsRequestDF.getOutType());
					resp.getOutputStream().println();
					return Result.ok();
				default:
					return Result.err(rp);
			}
		} catch (Exception e) {
			trans.error().log(e,IN,ADD_NS_ADMIN);
			return Result.err(e);
		} finally {
			tt.done();
		}
	}
1268559
public static snmp_view[] get(nitro_service client) throws Exception
	{
		snmp_view resource = new snmp_view();
		resource.validate("get");
		return (snmp_view[]) resource.get_resources(client);
	}
356114
public static base_response add(nitro_service client, ntpserver resource) throws Exception {
		ntpserver addresource = new ntpserver();
		addresource.serverip = resource.serverip;
		addresource.servername = resource.servername;
		addresource.minpoll = resource.minpoll;
		addresource.maxpoll = resource.maxpoll;
		addresource.autokey = resource.autokey;
		addresource.key = resource.key;
		return addresource.add_resource(client);
	}
207339
def add_snmp(data, interfaces):
    
    snmp_interface = []
    if interfaces: # Not providing interfaces will enable SNMP on all NDIs
        interfaces = map(str, interfaces)
        for interface in data:
            interface_id = str(interface.get('interface_id'))
            for if_def in interface.get('interfaces', []):
                _interface_id = None
                if 'vlan_id' in if_def:
                    _interface_id = '{}.{}'.format(
                        interface_id, if_def['vlan_id'])
                else:
                    _interface_id = interface_id
                if _interface_id in interfaces and 'type' not in interface:
                    for node in if_def.get('nodes', []):
                        snmp_interface.append(
                            {'address': node.get('address'),
                             'nicid': _interface_id})
    return snmp_interface
1142467
public static base_responses add(nitro_service client, dnssuffix resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			dnssuffix addresources[] = new dnssuffix[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new dnssuffix();
				addresources[i].Dnssuffix = resources[i].Dnssuffix;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
121745
private void addRestResourceClasses(Set<Class<?>> resources) {
        resources.add(pl.setblack.chatsample.web.ChatService.class);
    }