code
stringlengths 73
34.1k
| label
stringclasses 1
value |
---|---|
public static base_responses add(nitro_service client, dnsaaaarec resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaaaarec addresources[] = new dnsaaaarec[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dnsaaaarec();
addresources[i].hostname = resources[i].hostname;
addresources[i].ipv6address = resources[i].ipv6address;
addresources[i].ttl = resources[i].ttl;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static base_response delete(nitro_service client, dnsaaaarec resource) throws Exception {
dnsaaaarec deleteresource = new dnsaaaarec();
deleteresource.hostname = resource.hostname;
deleteresource.ipv6address = resource.ipv6address;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, String hostname[]) throws Exception {
base_responses result = null;
if (hostname != null && hostname.length > 0) {
dnsaaaarec deleteresources[] = new dnsaaaarec[hostname.length];
for (int i=0;i<hostname.length;i++){
deleteresources[i] = new dnsaaaarec();
deleteresources[i].hostname = hostname[i];
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java |
public static base_responses delete(nitro_service client, dnsaaaarec resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dnsaaaarec deleteresources[] = new dnsaaaarec[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new dnsaaaarec();
deleteresources[i].hostname = resources[i].hostname;
deleteresources[i].ipv6address = resources[i].ipv6address;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java |
public static dnsaaaarec[] get(nitro_service service) throws Exception{
dnsaaaarec obj = new dnsaaaarec();
dnsaaaarec[] response = (dnsaaaarec[])obj.get_resources(service);
return response;
} | java |
public static dnsaaaarec[] get(nitro_service service, dnsaaaarec_args args) throws Exception{
dnsaaaarec obj = new dnsaaaarec();
options option = new options();
option.set_args(nitro_util.object_to_string_withoutquotes(args));
dnsaaaarec[] response = (dnsaaaarec[])obj.get_resources(service, option);
return response;
} | java |
private String addIndexInputToList(String name, IndexInput in,
String postingsFormatName) throws IOException {
if (indexInputList.get(name) != null) {
indexInputList.get(name).close();
}
if (in != null) {
String localPostingsFormatName = postingsFormatName;
if (localPostingsFormatName == null) {
localPostingsFormatName = in.readString();
} else if (!in.readString().equals(localPostingsFormatName)) {
throw new IOException("delegate codec " + name + " doesn't equal "
+ localPostingsFormatName);
}
indexInputList.put(name, in);
indexInputOffsetList.put(name, in.getFilePointer());
return localPostingsFormatName;
} else {
log.debug("no " + name + " registered");
return null;
}
} | java |
public static appfwprofile_cookieconsistency_binding[] get(nitro_service service, String name) throws Exception{
appfwprofile_cookieconsistency_binding obj = new appfwprofile_cookieconsistency_binding();
obj.set_name(name);
appfwprofile_cookieconsistency_binding response[] = (appfwprofile_cookieconsistency_binding[]) obj.get_resources(service);
return response;
} | java |
public static rnatip_stats[] get(nitro_service service, options option) throws Exception{
rnatip_stats obj = new rnatip_stats();
rnatip_stats[] response = (rnatip_stats[])obj.stat_resources(service,option);
return response;
} | java |
public static rnatip_stats get(nitro_service service, String Rnatip) throws Exception{
rnatip_stats obj = new rnatip_stats();
obj.set_Rnatip(Rnatip);
rnatip_stats response = (rnatip_stats) obj.stat_resource(service);
return response;
} | java |
public static clusternodegroup_binding get(nitro_service service, String name) throws Exception{
clusternodegroup_binding obj = new clusternodegroup_binding();
obj.set_name(name);
clusternodegroup_binding response = (clusternodegroup_binding) obj.get_resource(service);
return response;
} | java |
public static lbvserver_servicegroupmember_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_servicegroupmember_binding obj = new lbvserver_servicegroupmember_binding();
obj.set_name(name);
lbvserver_servicegroupmember_binding response[] = (lbvserver_servicegroupmember_binding[]) obj.get_resources(service);
return response;
} | java |
public static void main(String[] args) {
try {
TreeFactory tf = new LabeledScoredTreeFactory();
Reader r = new BufferedReader(new InputStreamReader(new FileInputStream(args[0]), "UTF-8"));
TreeReader tr = new PennTreeReader(r, tf);
Tree t = tr.readTree();
while (t != null) {
System.out.println(t);
System.out.println();
t = tr.readTree();
}
r.close();
} catch (IOException ioe) {
ioe.printStackTrace();
}
} | java |
public static base_response clear(nitro_service client, Interface resource) throws Exception {
Interface clearresource = new Interface();
clearresource.id = resource.id;
return clearresource.perform_operation(client,"clear");
} | java |
public static base_responses clear(nitro_service client, Interface resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
Interface clearresources[] = new Interface[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new Interface();
clearresources[i].id = resources[i].id;
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | java |
public static base_response update(nitro_service client, Interface resource) throws Exception {
Interface updateresource = new Interface();
updateresource.id = resource.id;
updateresource.speed = resource.speed;
updateresource.duplex = resource.duplex;
updateresource.flowctl = resource.flowctl;
updateresource.autoneg = resource.autoneg;
updateresource.hamonitor = resource.hamonitor;
updateresource.tagall = resource.tagall;
updateresource.trunk = resource.trunk;
updateresource.lacpmode = resource.lacpmode;
updateresource.lacpkey = resource.lacpkey;
updateresource.lagtype = resource.lagtype;
updateresource.lacppriority = resource.lacppriority;
updateresource.lacptimeout = resource.lacptimeout;
updateresource.ifalias = resource.ifalias;
updateresource.throughput = resource.throughput;
updateresource.bandwidthhigh = resource.bandwidthhigh;
updateresource.bandwidthnormal = resource.bandwidthnormal;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, Interface resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
Interface updateresources[] = new Interface[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new Interface();
updateresources[i].id = resources[i].id;
updateresources[i].speed = resources[i].speed;
updateresources[i].duplex = resources[i].duplex;
updateresources[i].flowctl = resources[i].flowctl;
updateresources[i].autoneg = resources[i].autoneg;
updateresources[i].hamonitor = resources[i].hamonitor;
updateresources[i].tagall = resources[i].tagall;
updateresources[i].trunk = resources[i].trunk;
updateresources[i].lacpmode = resources[i].lacpmode;
updateresources[i].lacpkey = resources[i].lacpkey;
updateresources[i].lagtype = resources[i].lagtype;
updateresources[i].lacppriority = resources[i].lacppriority;
updateresources[i].lacptimeout = resources[i].lacptimeout;
updateresources[i].ifalias = resources[i].ifalias;
updateresources[i].throughput = resources[i].throughput;
updateresources[i].bandwidthhigh = resources[i].bandwidthhigh;
updateresources[i].bandwidthnormal = resources[i].bandwidthnormal;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java |
public static base_response unset(nitro_service client, Interface resource, String[] args) throws Exception{
Interface unsetresource = new Interface();
unsetresource.id = resource.id;
return unsetresource.unset_resource(client,args);
} | java |
public static base_response enable(nitro_service client, String id) throws Exception {
Interface enableresource = new Interface();
enableresource.id = id;
return enableresource.perform_operation(client,"enable");
} | java |
public static base_responses enable(nitro_service client, String id[]) throws Exception {
base_responses result = null;
if (id != null && id.length > 0) {
Interface enableresources[] = new Interface[id.length];
for (int i=0;i<id.length;i++){
enableresources[i] = new Interface();
enableresources[i].id = id[i];
}
result = perform_operation_bulk_request(client, enableresources,"enable");
}
return result;
} | java |
public static base_response disable(nitro_service client, String id) throws Exception {
Interface disableresource = new Interface();
disableresource.id = id;
return disableresource.perform_operation(client,"disable");
} | java |
public static base_responses disable(nitro_service client, String id[]) throws Exception {
base_responses result = null;
if (id != null && id.length > 0) {
Interface disableresources[] = new Interface[id.length];
for (int i=0;i<id.length;i++){
disableresources[i] = new Interface();
disableresources[i].id = id[i];
}
result = perform_operation_bulk_request(client, disableresources,"disable");
}
return result;
} | java |
public static base_response reset(nitro_service client, Interface resource) throws Exception {
Interface resetresource = new Interface();
resetresource.id = resource.id;
return resetresource.perform_operation(client,"reset");
} | java |
public static base_responses reset(nitro_service client, Interface resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
Interface resetresources[] = new Interface[resources.length];
for (int i=0;i<resources.length;i++){
resetresources[i] = new Interface();
resetresources[i].id = resources[i].id;
}
result = perform_operation_bulk_request(client, resetresources,"reset");
}
return result;
} | java |
public static Interface[] get(nitro_service service) throws Exception{
Interface obj = new Interface();
Interface[] response = (Interface[])obj.get_resources(service);
return response;
} | java |
public static Interface get(nitro_service service, String id) throws Exception{
Interface obj = new Interface();
obj.set_id(id);
Interface response = (Interface) obj.get_resource(service);
return response;
} | java |
@Override
public boolean containsKey(Object key) {
// key could be not in original or in deltaMap
// key could be not in original but in deltaMap
// key could be in original but removed from deltaMap
// key could be in original but mapped to something else in deltaMap
Object value = deltaMap.get(key);
if (value == null) {
return originalMap.containsKey(key);
}
if (value == removedValue) {
return false;
}
return true;
} | java |
@Override
public V get(Object key) {
// key could be not in original or in deltaMap
// key could be not in original but in deltaMap
// key could be in original but removed from deltaMap
// key could be in original but mapped to something else in deltaMap
V deltaResult = deltaMap.get(key);
if (deltaResult == null) {
return originalMap.get(key);
}
if (deltaResult == nullValue) {
return null;
}
if (deltaResult == removedValue) {
return null;
}
return deltaResult;
} | java |
@Override
@SuppressWarnings("unchecked")
public V put(K key, V value) {
if (value == null) {
return put(key, (V)nullValue);
}
// key could be not in original or in deltaMap
// key could be not in original but in deltaMap
// key could be in original but removed from deltaMap
// key could be in original but mapped to something else in deltaMap
V result = deltaMap.put(key, value);
if (result == null) {
return originalMap.get(key);
}
if (result == nullValue) {
return null;
}
if (result == removedValue) {
return null;
}
return result;
} | java |
public static vpnvserver_cachepolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_cachepolicy_binding obj = new vpnvserver_cachepolicy_binding();
obj.set_name(name);
vpnvserver_cachepolicy_binding response[] = (vpnvserver_cachepolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response update(nitro_service client, bridgetable resource) throws Exception {
bridgetable updateresource = new bridgetable();
updateresource.bridgeage = resource.bridgeage;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, bridgetable resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
bridgetable updateresources[] = new bridgetable[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new bridgetable();
updateresources[i].bridgeage = resources[i].bridgeage;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java |
public static base_response unset(nitro_service client, bridgetable resource, String[] args) throws Exception{
bridgetable unsetresource = new bridgetable();
return unsetresource.unset_resource(client,args);
} | java |
public static base_responses unset(nitro_service client, bridgetable resources[], String[] args) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
bridgetable unsetresources[] = new bridgetable[resources.length];
for (int i=0;i<resources.length;i++){
unsetresources[i] = new bridgetable();
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java |
public static base_response clear(nitro_service client, bridgetable resource) throws Exception {
bridgetable clearresource = new bridgetable();
clearresource.vlan = resource.vlan;
clearresource.ifnum = resource.ifnum;
return clearresource.perform_operation(client,"clear");
} | java |
public static base_responses clear(nitro_service client, bridgetable resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
bridgetable clearresources[] = new bridgetable[resources.length];
for (int i=0;i<resources.length;i++){
clearresources[i] = new bridgetable();
clearresources[i].vlan = resources[i].vlan;
clearresources[i].ifnum = resources[i].ifnum;
}
result = perform_operation_bulk_request(client, clearresources,"clear");
}
return result;
} | java |
public static bridgetable[] get(nitro_service service) throws Exception{
bridgetable obj = new bridgetable();
bridgetable[] response = (bridgetable[])obj.get_resources(service);
return response;
} | java |
public static base_response update(nitro_service client, nsdiameter resource) throws Exception {
nsdiameter updateresource = new nsdiameter();
updateresource.identity = resource.identity;
updateresource.realm = resource.realm;
updateresource.serverclosepropagation = resource.serverclosepropagation;
return updateresource.update_resource(client);
} | java |
public static base_response unset(nitro_service client, nsdiameter resource, String[] args) throws Exception{
nsdiameter unsetresource = new nsdiameter();
return unsetresource.unset_resource(client,args);
} | java |
public static nsdiameter get(nitro_service service) throws Exception{
nsdiameter obj = new nsdiameter();
nsdiameter[] response = (nsdiameter[])obj.get_resources(service);
return response[0];
} | java |
public static base_response add(nitro_service client, gslbservice resource) throws Exception {
gslbservice addresource = new gslbservice();
addresource.servicename = resource.servicename;
addresource.cnameentry = resource.cnameentry;
addresource.ip = resource.ip;
addresource.servername = resource.servername;
addresource.servicetype = resource.servicetype;
addresource.port = resource.port;
addresource.publicip = resource.publicip;
addresource.publicport = resource.publicport;
addresource.maxclient = resource.maxclient;
addresource.healthmonitor = resource.healthmonitor;
addresource.sitename = resource.sitename;
addresource.state = resource.state;
addresource.cip = resource.cip;
addresource.cipheader = resource.cipheader;
addresource.sitepersistence = resource.sitepersistence;
addresource.cookietimeout = resource.cookietimeout;
addresource.siteprefix = resource.siteprefix;
addresource.clttimeout = resource.clttimeout;
addresource.svrtimeout = resource.svrtimeout;
addresource.maxbandwidth = resource.maxbandwidth;
addresource.downstateflush = resource.downstateflush;
addresource.maxaaausers = resource.maxaaausers;
addresource.monthreshold = resource.monthreshold;
addresource.hashid = resource.hashid;
addresource.comment = resource.comment;
addresource.appflowlog = resource.appflowlog;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, gslbservice resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbservice addresources[] = new gslbservice[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new gslbservice();
addresources[i].servicename = resources[i].servicename;
addresources[i].cnameentry = resources[i].cnameentry;
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].publicip = resources[i].publicip;
addresources[i].publicport = resources[i].publicport;
addresources[i].maxclient = resources[i].maxclient;
addresources[i].healthmonitor = resources[i].healthmonitor;
addresources[i].sitename = resources[i].sitename;
addresources[i].state = resources[i].state;
addresources[i].cip = resources[i].cip;
addresources[i].cipheader = resources[i].cipheader;
addresources[i].sitepersistence = resources[i].sitepersistence;
addresources[i].cookietimeout = resources[i].cookietimeout;
addresources[i].siteprefix = resources[i].siteprefix;
addresources[i].clttimeout = resources[i].clttimeout;
addresources[i].svrtimeout = resources[i].svrtimeout;
addresources[i].maxbandwidth = resources[i].maxbandwidth;
addresources[i].downstateflush = resources[i].downstateflush;
addresources[i].maxaaausers = resources[i].maxaaausers;
addresources[i].monthreshold = resources[i].monthreshold;
addresources[i].hashid = resources[i].hashid;
addresources[i].comment = resources[i].comment;
addresources[i].appflowlog = resources[i].appflowlog;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static base_response delete(nitro_service client, String servicename) throws Exception {
gslbservice deleteresource = new gslbservice();
deleteresource.servicename = servicename;
return deleteresource.delete_resource(client);
} | java |
public static base_response update(nitro_service client, gslbservice resource) throws Exception {
gslbservice updateresource = new gslbservice();
updateresource.servicename = resource.servicename;
updateresource.ipaddress = resource.ipaddress;
updateresource.publicip = resource.publicip;
updateresource.publicport = resource.publicport;
updateresource.cip = resource.cip;
updateresource.cipheader = resource.cipheader;
updateresource.sitepersistence = resource.sitepersistence;
updateresource.siteprefix = resource.siteprefix;
updateresource.maxclient = resource.maxclient;
updateresource.healthmonitor = resource.healthmonitor;
updateresource.maxbandwidth = resource.maxbandwidth;
updateresource.downstateflush = resource.downstateflush;
updateresource.maxaaausers = resource.maxaaausers;
updateresource.viewname = resource.viewname;
updateresource.viewip = resource.viewip;
updateresource.monthreshold = resource.monthreshold;
updateresource.weight = resource.weight;
updateresource.monitor_name_svc = resource.monitor_name_svc;
updateresource.hashid = resource.hashid;
updateresource.comment = resource.comment;
updateresource.appflowlog = resource.appflowlog;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, gslbservice resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbservice updateresources[] = new gslbservice[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new gslbservice();
updateresources[i].servicename = resources[i].servicename;
updateresources[i].ipaddress = resources[i].ipaddress;
updateresources[i].publicip = resources[i].publicip;
updateresources[i].publicport = resources[i].publicport;
updateresources[i].cip = resources[i].cip;
updateresources[i].cipheader = resources[i].cipheader;
updateresources[i].sitepersistence = resources[i].sitepersistence;
updateresources[i].siteprefix = resources[i].siteprefix;
updateresources[i].maxclient = resources[i].maxclient;
updateresources[i].healthmonitor = resources[i].healthmonitor;
updateresources[i].maxbandwidth = resources[i].maxbandwidth;
updateresources[i].downstateflush = resources[i].downstateflush;
updateresources[i].maxaaausers = resources[i].maxaaausers;
updateresources[i].viewname = resources[i].viewname;
updateresources[i].viewip = resources[i].viewip;
updateresources[i].monthreshold = resources[i].monthreshold;
updateresources[i].weight = resources[i].weight;
updateresources[i].monitor_name_svc = resources[i].monitor_name_svc;
updateresources[i].hashid = resources[i].hashid;
updateresources[i].comment = resources[i].comment;
updateresources[i].appflowlog = resources[i].appflowlog;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java |
public static base_responses unset(nitro_service client, gslbservice resources[], String[] args) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
gslbservice unsetresources[] = new gslbservice[resources.length];
for (int i=0;i<resources.length;i++){
unsetresources[i] = new gslbservice();
unsetresources[i].servicename = resources[i].servicename;
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java |
public static base_response rename(nitro_service client, gslbservice resource, String new_servicename) throws Exception {
gslbservice renameresource = new gslbservice();
renameresource.servicename = resource.servicename;
return renameresource.rename_resource(client,new_servicename);
} | java |
public static gslbservice[] get(nitro_service service) throws Exception{
gslbservice obj = new gslbservice();
gslbservice[] response = (gslbservice[])obj.get_resources(service);
return response;
} | java |
public static gslbservice get(nitro_service service, String servicename) throws Exception{
gslbservice obj = new gslbservice();
obj.set_servicename(servicename);
gslbservice response = (gslbservice) obj.get_resource(service);
return response;
} | java |
public static gslbservice[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
gslbservice obj = new gslbservice();
options option = new options();
option.set_filter(filter);
gslbservice[] response = (gslbservice[]) obj.getfiltered(service, option);
return response;
} | java |
public static aaaglobal_binding get(nitro_service service) throws Exception{
aaaglobal_binding obj = new aaaglobal_binding();
aaaglobal_binding response = (aaaglobal_binding) obj.get_resource(service);
return response;
} | java |
public static base_response add(nitro_service client, clusterinstance resource) throws Exception {
clusterinstance addresource = new clusterinstance();
addresource.clid = resource.clid;
addresource.deadinterval = resource.deadinterval;
addresource.hellointerval = resource.hellointerval;
addresource.preemption = resource.preemption;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, clusterinstance resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusterinstance addresources[] = new clusterinstance[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new clusterinstance();
addresources[i].clid = resources[i].clid;
addresources[i].deadinterval = resources[i].deadinterval;
addresources[i].hellointerval = resources[i].hellointerval;
addresources[i].preemption = resources[i].preemption;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static base_response delete(nitro_service client, Long clid) throws Exception {
clusterinstance deleteresource = new clusterinstance();
deleteresource.clid = clid;
return deleteresource.delete_resource(client);
} | java |
public static base_responses delete(nitro_service client, clusterinstance resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusterinstance deleteresources[] = new clusterinstance[resources.length];
for (int i=0;i<resources.length;i++){
deleteresources[i] = new clusterinstance();
deleteresources[i].clid = resources[i].clid;
}
result = delete_bulk_request(client, deleteresources);
}
return result;
} | java |
public static base_response update(nitro_service client, clusterinstance resource) throws Exception {
clusterinstance updateresource = new clusterinstance();
updateresource.clid = resource.clid;
updateresource.deadinterval = resource.deadinterval;
updateresource.hellointerval = resource.hellointerval;
updateresource.preemption = resource.preemption;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, clusterinstance resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
clusterinstance updateresources[] = new clusterinstance[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new clusterinstance();
updateresources[i].clid = resources[i].clid;
updateresources[i].deadinterval = resources[i].deadinterval;
updateresources[i].hellointerval = resources[i].hellointerval;
updateresources[i].preemption = resources[i].preemption;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java |
public static base_response unset(nitro_service client, clusterinstance resource, String[] args) throws Exception{
clusterinstance unsetresource = new clusterinstance();
unsetresource.clid = resource.clid;
return unsetresource.unset_resource(client,args);
} | java |
public static base_responses unset(nitro_service client, Long clid[], String args[]) throws Exception {
base_responses result = null;
if (clid != null && clid.length > 0) {
clusterinstance unsetresources[] = new clusterinstance[clid.length];
for (int i=0;i<clid.length;i++){
unsetresources[i] = new clusterinstance();
unsetresources[i].clid = clid[i];
}
result = unset_bulk_request(client, unsetresources,args);
}
return result;
} | java |
public static base_response enable(nitro_service client, Long clid) throws Exception {
clusterinstance enableresource = new clusterinstance();
enableresource.clid = clid;
return enableresource.perform_operation(client,"enable");
} | java |
public static base_responses enable(nitro_service client, Long clid[]) throws Exception {
base_responses result = null;
if (clid != null && clid.length > 0) {
clusterinstance enableresources[] = new clusterinstance[clid.length];
for (int i=0;i<clid.length;i++){
enableresources[i] = new clusterinstance();
enableresources[i].clid = clid[i];
}
result = perform_operation_bulk_request(client, enableresources,"enable");
}
return result;
} | java |
public static base_response disable(nitro_service client, Long clid) throws Exception {
clusterinstance disableresource = new clusterinstance();
disableresource.clid = clid;
return disableresource.perform_operation(client,"disable");
} | java |
public static base_responses disable(nitro_service client, Long clid[]) throws Exception {
base_responses result = null;
if (clid != null && clid.length > 0) {
clusterinstance disableresources[] = new clusterinstance[clid.length];
for (int i=0;i<clid.length;i++){
disableresources[i] = new clusterinstance();
disableresources[i].clid = clid[i];
}
result = perform_operation_bulk_request(client, disableresources,"disable");
}
return result;
} | java |
public static clusterinstance[] get(nitro_service service) throws Exception{
clusterinstance obj = new clusterinstance();
clusterinstance[] response = (clusterinstance[])obj.get_resources(service);
return response;
} | java |
public static clusterinstance get(nitro_service service, Long clid) throws Exception{
clusterinstance obj = new clusterinstance();
obj.set_clid(clid);
clusterinstance response = (clusterinstance) obj.get_resource(service);
return response;
} | java |
public static clusterinstance[] get(nitro_service service, Long clid[]) throws Exception{
if (clid !=null && clid.length>0) {
clusterinstance response[] = new clusterinstance[clid.length];
clusterinstance obj[] = new clusterinstance[clid.length];
for (int i=0;i<clid.length;i++) {
obj[i] = new clusterinstance();
obj[i].set_clid(clid[i]);
response[i] = (clusterinstance) obj[i].get_resource(service);
}
return response;
}
return null;
} | java |
public static vpnglobal_vpnnexthopserver_binding[] get(nitro_service service) throws Exception{
vpnglobal_vpnnexthopserver_binding obj = new vpnglobal_vpnnexthopserver_binding();
vpnglobal_vpnnexthopserver_binding response[] = (vpnglobal_vpnnexthopserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static appfwpolicy_csvserver_binding[] get(nitro_service service, String name) throws Exception{
appfwpolicy_csvserver_binding obj = new appfwpolicy_csvserver_binding();
obj.set_name(name);
appfwpolicy_csvserver_binding response[] = (appfwpolicy_csvserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static vpnvserver_aaapreauthenticationpolicy_binding[] get(nitro_service service, String name) throws Exception{
vpnvserver_aaapreauthenticationpolicy_binding obj = new vpnvserver_aaapreauthenticationpolicy_binding();
obj.set_name(name);
vpnvserver_aaapreauthenticationpolicy_binding response[] = (vpnvserver_aaapreauthenticationpolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response Shutdown(nitro_service client, shutdown resource) throws Exception {
shutdown Shutdownresource = new shutdown();
return Shutdownresource.perform_operation(client);
} | java |
public HashSet<String> getDataById(String id) throws IOException {
if (idToVersion.containsKey(id)) {
return get(id);
} else {
return null;
}
} | java |
public Automaton getAutomatonById(String id) throws IOException {
if (idToVersion.containsKey(id)) {
List<BytesRef> bytesArray = new ArrayList<>();
Set<String> data = get(id);
if (data != null) {
Term term;
for (String item : data) {
term = new Term("dummy", item);
bytesArray.add(term.bytes());
}
Collections.sort(bytesArray);
return Automata.makeStringUnion(bytesArray);
}
}
return null;
} | java |
public void deleteById(String id) {
if (idToVersion.containsKey(id)) {
String version = idToVersion.remove(id);
expirationVersion.remove(version);
versionToItem.remove(version);
if (collectionCachePath != null
&& !collectionCachePath.resolve(version).toFile().delete()) {
log.debug("couldn't delete " + version);
}
}
} | java |
private String filterTag(String tag) {
AttributeValues answerAV = TagSet.getTagSet().fromTag(tag);
answerAV.removeNonlexicalAttributes();
return TagSet.getTagSet().toTag(answerAV);
} | java |
public static base_response update(nitro_service client, ipv6 resource) throws Exception {
ipv6 updateresource = new ipv6();
updateresource.ralearning = resource.ralearning;
updateresource.routerredirection = resource.routerredirection;
updateresource.ndbasereachtime = resource.ndbasereachtime;
updateresource.ndretransmissiontime = resource.ndretransmissiontime;
updateresource.natprefix = resource.natprefix;
updateresource.dodad = resource.dodad;
return updateresource.update_resource(client);
} | java |
public static base_response unset(nitro_service client, ipv6 resource, String[] args) throws Exception{
ipv6 unsetresource = new ipv6();
return unsetresource.unset_resource(client,args);
} | java |
public static ipv6 get(nitro_service service) throws Exception{
ipv6 obj = new ipv6();
ipv6[] response = (ipv6[])obj.get_resources(service);
return response[0];
} | java |
public static filterpolicy_binding get(nitro_service service, String name) throws Exception{
filterpolicy_binding obj = new filterpolicy_binding();
obj.set_name(name);
filterpolicy_binding response = (filterpolicy_binding) obj.get_resource(service);
return response;
} | java |
public static base_response unset(nitro_service client, coparameter resource, String[] args) throws Exception{
coparameter unsetresource = new coparameter();
return unsetresource.unset_resource(client,args);
} | java |
public static base_response add(nitro_service client, dbdbprofile resource) throws Exception {
dbdbprofile addresource = new dbdbprofile();
addresource.name = resource.name;
addresource.interpretquery = resource.interpretquery;
addresource.stickiness = resource.stickiness;
addresource.kcdaccount = resource.kcdaccount;
addresource.conmultiplex = resource.conmultiplex;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, dbdbprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dbdbprofile addresources[] = new dbdbprofile[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new dbdbprofile();
addresources[i].name = resources[i].name;
addresources[i].interpretquery = resources[i].interpretquery;
addresources[i].stickiness = resources[i].stickiness;
addresources[i].kcdaccount = resources[i].kcdaccount;
addresources[i].conmultiplex = resources[i].conmultiplex;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static base_response update(nitro_service client, dbdbprofile resource) throws Exception {
dbdbprofile updateresource = new dbdbprofile();
updateresource.name = resource.name;
updateresource.interpretquery = resource.interpretquery;
updateresource.stickiness = resource.stickiness;
updateresource.kcdaccount = resource.kcdaccount;
updateresource.conmultiplex = resource.conmultiplex;
return updateresource.update_resource(client);
} | java |
public static base_responses update(nitro_service client, dbdbprofile resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
dbdbprofile updateresources[] = new dbdbprofile[resources.length];
for (int i=0;i<resources.length;i++){
updateresources[i] = new dbdbprofile();
updateresources[i].name = resources[i].name;
updateresources[i].interpretquery = resources[i].interpretquery;
updateresources[i].stickiness = resources[i].stickiness;
updateresources[i].kcdaccount = resources[i].kcdaccount;
updateresources[i].conmultiplex = resources[i].conmultiplex;
}
result = update_bulk_request(client, updateresources);
}
return result;
} | java |
public static dbdbprofile[] get(nitro_service service) throws Exception{
dbdbprofile obj = new dbdbprofile();
dbdbprofile[] response = (dbdbprofile[])obj.get_resources(service);
return response;
} | java |
public static dbdbprofile get(nitro_service service, String name) throws Exception{
dbdbprofile obj = new dbdbprofile();
obj.set_name(name);
dbdbprofile response = (dbdbprofile) obj.get_resource(service);
return response;
} | java |
public static dbdbprofile[] get_filtered(nitro_service service, filtervalue[] filter) throws Exception{
dbdbprofile obj = new dbdbprofile();
options option = new options();
option.set_filter(filter);
dbdbprofile[] response = (dbdbprofile[]) obj.getfiltered(service, option);
return response;
} | java |
public Boolean checkType(String type) {
if (mtasPositionType == null) {
return false;
} else {
return mtasPositionType.equals(type);
}
} | java |
public Integer getEnd() {
if (mtasPositionType.equals(POSITION_RANGE)
|| mtasPositionType.equals(POSITION_SET)) {
return mtasPositionEnd;
} else if (mtasPositionType.equals(POSITION_SINGLE)) {
return mtasPositionStart;
} else {
return null;
}
} | java |
public static wisite_farmname_binding[] get(nitro_service service, String sitepath) throws Exception{
wisite_farmname_binding obj = new wisite_farmname_binding();
obj.set_sitepath(sitepath);
wisite_farmname_binding response[] = (wisite_farmname_binding[]) obj.get_resources(service);
return response;
} | java |
public static base_response add(nitro_service client, cachepolicylabel resource) throws Exception {
cachepolicylabel addresource = new cachepolicylabel();
addresource.labelname = resource.labelname;
addresource.evaluates = resource.evaluates;
return addresource.add_resource(client);
} | java |
public static base_responses add(nitro_service client, cachepolicylabel resources[]) throws Exception {
base_responses result = null;
if (resources != null && resources.length > 0) {
cachepolicylabel addresources[] = new cachepolicylabel[resources.length];
for (int i=0;i<resources.length;i++){
addresources[i] = new cachepolicylabel();
addresources[i].labelname = resources[i].labelname;
addresources[i].evaluates = resources[i].evaluates;
}
result = add_bulk_request(client, addresources);
}
return result;
} | java |
public static cachepolicylabel[] get(nitro_service service) throws Exception{
cachepolicylabel obj = new cachepolicylabel();
cachepolicylabel[] response = (cachepolicylabel[])obj.get_resources(service);
return response;
} | java |
public static cachepolicylabel get(nitro_service service, String labelname) throws Exception{
cachepolicylabel obj = new cachepolicylabel();
obj.set_labelname(labelname);
cachepolicylabel response = (cachepolicylabel) obj.get_resource(service);
return response;
} | java |
public static authenticationldappolicy_authenticationvserver_binding[] get(nitro_service service, String name) throws Exception{
authenticationldappolicy_authenticationvserver_binding obj = new authenticationldappolicy_authenticationvserver_binding();
obj.set_name(name);
authenticationldappolicy_authenticationvserver_binding response[] = (authenticationldappolicy_authenticationvserver_binding[]) obj.get_resources(service);
return response;
} | java |
public static dnszone_domain_binding[] get(nitro_service service, String zonename) throws Exception{
dnszone_domain_binding obj = new dnszone_domain_binding();
obj.set_zonename(zonename);
dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.get_resources(service);
return response;
} | java |
public static long count(nitro_service service, String zonename) throws Exception{
dnszone_domain_binding obj = new dnszone_domain_binding();
obj.set_zonename(zonename);
options option = new options();
option.set_count(true);
dnszone_domain_binding response[] = (dnszone_domain_binding[]) obj.get_resources(service,option);
if (response != null) {
return response[0].__count;
}
return 0;
} | java |
public static lbvserver_rewritepolicy_binding[] get(nitro_service service, String name) throws Exception{
lbvserver_rewritepolicy_binding obj = new lbvserver_rewritepolicy_binding();
obj.set_name(name);
lbvserver_rewritepolicy_binding response[] = (lbvserver_rewritepolicy_binding[]) obj.get_resources(service);
return response;
} | java |
public static String ptb2Text(String ptbText) {
StringBuilder sb = new StringBuilder(ptbText.length()); // probably an overestimate
PTB2TextLexer lexer = new PTB2TextLexer(new StringReader(ptbText));
try {
for (String token; (token = lexer.next()) != null; ) {
sb.append(token);
}
} catch (IOException e) {
e.printStackTrace();
}
return sb.toString();
} | java |
public static int ptb2Text(Reader ptbText, Writer w) throws IOException {
int numTokens = 0;
PTB2TextLexer lexer = new PTB2TextLexer(ptbText);
for (String token; (token = lexer.next()) != null; ) {
numTokens++;
w.write(token);
}
return numTokens;
} | java |
public static <T extends HasWord> TokenizerFactory<T> factory(LexedTokenFactory<T> factory, String options) {
return new PTBTokenizerFactory<T>(factory, options);
} | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.