Use this API to add pqpolicy resources.
424125
public static base_responses add(nitro_service client, pqpolicy resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			pqpolicy addresources[] = new pqpolicy[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new pqpolicy();
				addresources[i].policyname = resources[i].policyname;
				addresources[i].rule = resources[i].rule;
				addresources[i].priority = resources[i].priority;
				addresources[i].weight = resources[i].weight;
				addresources[i].qdepth = resources[i].qdepth;
				addresources[i].polqdepth = resources[i].polqdepth;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
1331536
def update_ikepolicy(self, ikepolicy, body=None):
        """"""
        return self.put(self.ikepolicy_path % (ikepolicy), body=body)
1320522
def add_resource(self, resource_id, attributes, parents=[],
            issuer='default'):
        
        # MAINT: consider test to avoid adding duplicate resource id
        assert isinstance(attributes, (dict)), "attributes expected to be dict"

        attrs = []
        for key in attributes.keys():
            attrs.append({
                'issuer': issuer,
                'name': key,
                'value': attributes[key]
                })

        body = {
            "resourceIdentifier": resource_id,
            "parents": parents,
            "attributes": attrs,
        }

        return self._put_resource(resource_id, body)
1031611
public static base_responses add(nitro_service client, vpnintranetapplication resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			vpnintranetapplication addresources[] = new vpnintranetapplication[resources.length];
			for (int i=0;i<resources.length;i++){
				addresources[i] = new vpnintranetapplication();
				addresources[i].intranetapplication = resources[i].intranetapplication;
				addresources[i].protocol = resources[i].protocol;
				addresources[i].destip = resources[i].destip;
				addresources[i].netmask = resources[i].netmask;
				addresources[i].iprange = resources[i].iprange;
				addresources[i].hostname = resources[i].hostname;
				addresources[i].clientapplication = resources[i].clientapplication;
				addresources[i].spoofiip = resources[i].spoofiip;
				addresources[i].destport = resources[i].destport;
				addresources[i].interception = resources[i].interception;
				addresources[i].srcip = resources[i].srcip;
				addresources[i].srcport = resources[i].srcport;
			}
			result = add_bulk_request(client, addresources);
		}
		return result;
	}
57643
public static base_response add(nitro_service client, policymap resource) throws Exception {
		policymap addresource = new policymap();
		addresource.mappolicyname = resource.mappolicyname;
		addresource.sd = resource.sd;
		addresource.su = resource.su;
		addresource.td = resource.td;
		addresource.tu = resource.tu;
		return addresource.add_resource(client);
	}
1195448
protected void addGrantedRequest(ResourceRequestInfo req) {
    Context c = getContext(req.getType());
    c.grantedRequests.add(req);

    // assume a granted resource is going to be fully used
    c.fulfilledRequestCount++;
  }
463822
def add_routes(app):
    """"""
    for (prefix, routes) in API_SECTIONS:
        api = Api(app, prefix=prefix)
        for ((pattern, resource, *args), kwargs) in routes:
            kwargs.setdefault('strict_slashes', False)
            api.add_resource(resource, pattern, *args, **kwargs)
161182
public static base_response add(nitro_service client, scpolicy resource) throws Exception {
		scpolicy addresource = new scpolicy();
		addresource.name = resource.name;
		addresource.url = resource.url;
		addresource.rule = resource.rule;
		addresource.delay = resource.delay;
		addresource.maxconn = resource.maxconn;
		addresource.action = resource.action;
		addresource.altcontentsvcname = resource.altcontentsvcname;
		addresource.altcontentpath = resource.altcontentpath;
		return addresource.add_resource(client);
	}
1260834
async def AddPendingResources(self, addcharmwithauthorization, entity, resources):
        '''
        
        '''
        # map input types to rpc msg
        _params = dict()
        msg = dict(type='Resources',
                   request='AddPendingResources',
                   version=1,
                   params=_params)
        _params['AddCharmWithAuthorization'] = addcharmwithauthorization
        _params['Entity'] = entity
        _params['Resources'] = resources
        reply = await self.rpc(msg)
        return reply
724767
protected function addResourceFiles()
    {
        foreach ($this->data as $service => $resources) {
            foreach ($resources as $resourceName => $records) {
                $this->package->zipResourceFile($service . '/' . $resourceName . '.json', $records);
            }
        }
    }
112159
def add_pape(resp, policies = [], nist_auth_level = 0, auth_time = nil)
      if papereq = OpenID::PAPE::Request.from_openid_request(openid_request)
        paperesp = OpenID::PAPE::Response.new
        policies.each { |p| paperesp.add_policy_uri(p) }
        paperesp.nist_auth_level = nist_auth_level
        paperesp.auth_time = auth_time.utc.iso8601
        resp.add_extension(paperesp)
      end
      resp
    end
1181501
public static base_responses update(nitro_service client, pqpolicy resources[]) throws Exception {
		base_responses result = null;
		if (resources != null && resources.length > 0) {
			pqpolicy updateresources[] = new pqpolicy[resources.length];
			for (int i=0;i<resources.length;i++){
				updateresources[i] = new pqpolicy();
				updateresources[i].policyname = resources[i].policyname;
				updateresources[i].weight = resources[i].weight;
				updateresources[i].qdepth = resources[i].qdepth;
				updateresources[i].polqdepth = resources[i].polqdepth;
			}
			result = update_bulk_request(client, updateresources);
		}
		return result;
	}
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;
	}
877839
def add_policy(self, scaling_group, name, policy_type, cooldown,
            change=None, is_percent=False, desired_capacity=None, args=None):
        
        uri = "/%s/%s/policies" % (self.uri_base, utils.get_id(scaling_group))
        body = self._create_policy_body(name, policy_type, cooldown,
                change=change, is_percent=is_percent,
                desired_capacity=desired_capacity, args=args)
        # "body" needs to be a list
        body = [body]
        resp, resp_body = self.api.method_post(uri, body=body)
        pol_info = resp_body.get("policies")[0]
        return AutoScalePolicy(self, pol_info, scaling_group)
1180357
public CMARole addPolicy(CMAPolicy policy) {
    if (policies == null) {
      policies = new ArrayList<CMAPolicy>();
    }

    policies.add(policy);
    return this;
  }
597804
function addResources (statebox, options) {
  options.messages.info('Adding resources...')
  const stateResources = options.pluginComponents.stateResources
  if (!_.isObject(stateResources)) {
    return
  }

  const resourceClasses = {}
  for (const [name, resource] of Object.entries(stateResources)) {
    options.messages.detail(`Adding ${name}`)
    resourceClasses[name] = resource.componentModule
  } // for ...

  statebox.createModuleResources(resourceClasses)

  statebox.registerResourceResolver('function', functionResolver)
}
1148863
public static base_response add(nitro_service client, dnspolicylabel resource) throws Exception {
		dnspolicylabel addresource = new dnspolicylabel();
		addresource.labelname = resource.labelname;
		addresource.transform = resource.transform;
		return addresource.add_resource(client);
	}