/* (non-Javadoc)
@see com.tvd12.ezyfox.core.command.ResponseToRoom#only(java.lang.String[])
12010
@Override
    public ResponseToRoom only(String... params) {
        includedVars.addAll(Arrays.asList(params));
        return this;
    }
1115738
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		syslog_aaa_responses result = (syslog_aaa_responses) service.get_payload_formatter().string_to_resource(syslog_aaa_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.syslog_aaa_response_array);
		}
		syslog_aaa[] result_syslog_aaa = new syslog_aaa[result.syslog_aaa_response_array.length];
		
		for(int i = 0; i < result.syslog_aaa_response_array.length; i++)
		{
			result_syslog_aaa[i] = result.syslog_aaa_response_array[i].syslog_aaa[0];
		}
		
		return result_syslog_aaa;
	}
92177
public void setResponses(java.util.Collection<BatchReadOperationResponse> responses) {
        if (responses == null) {
            this.responses = null;
            return;
        }

        this.responses = new java.util.ArrayList<BatchReadOperationResponse>(responses);
    }
970650
public Map<Names, String> parseResponse(JSONArray response) throws CommandExecutionException {
        if (response == null) throw  new CommandExecutionException(CommandExecutionException.Error.INVALID_RESPONSE);
        if (response.length() != props.length) throw  new CommandExecutionException(CommandExecutionException.Error.INVALID_RESPONSE);
        Map<Names, String> ret = new HashMap<>(props.length);
        for (int i = 0; i < props.length; i++){
            ret.put(props[i], response.optString(i, ""));
        }
        return ret;
    }
1205243
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		xen_health_interface_responses result = (xen_health_interface_responses) service.get_payload_formatter().string_to_resource(xen_health_interface_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.xen_health_interface_response_array);
		}
		xen_health_interface[] result_xen_health_interface = new xen_health_interface[result.xen_health_interface_response_array.length];
		
		for(int i = 0; i < result.xen_health_interface_response_array.length; i++)
		{
			result_xen_health_interface[i] = result.xen_health_interface_response_array[i].xen_health_interface[0];
		}
		
		return result_xen_health_interface;
	}
1249768
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		sms_server_responses result = (sms_server_responses) service.get_payload_formatter().string_to_resource(sms_server_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.sms_server_response_array);
		}
		sms_server[] result_sms_server = new sms_server[result.sms_server_response_array.length];
		
		for(int i = 0; i < result.sms_server_response_array.length; i++)
		{
			result_sms_server[i] = result.sms_server_response_array[i].sms_server[0];
		}
		
		return result_sms_server;
	}
515197
public static base_responses disable(nitro_service client, String aclname[]) throws Exception {
		base_responses result = null;
		if (aclname != null && aclname.length > 0) {
			nsacl disableresources[] = new nsacl[aclname.length];
			for (int i=0;i<aclname.length;i++){
				disableresources[i] = new nsacl();
				disableresources[i].aclname = aclname[i];
			}
			result = perform_operation_bulk_request(client, disableresources,"disable");
		}
		return result;
	}
179126
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		syslog_ui_cmd_responses result = (syslog_ui_cmd_responses) service.get_payload_formatter().string_to_resource(syslog_ui_cmd_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.syslog_ui_cmd_response_array);
		}
		syslog_ui_cmd[] result_syslog_ui_cmd = new syslog_ui_cmd[result.syslog_ui_cmd_response_array.length];
		
		for(int i = 0; i < result.syslog_ui_cmd_response_array.length; i++)
		{
			result_syslog_ui_cmd[i] = result.syslog_ui_cmd_response_array[i].syslog_ui_cmd[0];
		}
		
		return result_syslog_ui_cmd;
	}
748336
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		version_matrix_status_responses result = (version_matrix_status_responses) service.get_payload_formatter().string_to_resource(version_matrix_status_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.version_matrix_status_response_array);
		}
		version_matrix_status[] result_version_matrix_status = new version_matrix_status[result.version_matrix_status_response_array.length];
		
		for(int i = 0; i < result.version_matrix_status_response_array.length; i++)
		{
			result_version_matrix_status[i] = result.version_matrix_status_response_array[i].version_matrix_status[0];
		}
		
		return result_version_matrix_status;
	}
212548
@Override
    public ResponseToRoom param(String name, Object value) {
        addition.put(name, value);
        return this;
    }
960144
public synchronized void setResponse(HttpServletResponse response) {

        if (perThreadResponse == null) {
            perThreadResponse = new ThreadLocal<HttpServletResponse>();
        }
        perThreadResponse.set(response);
    }
110925
@Override
    public T handleResponse(final HttpResponse response) throws IOException {

        InputStream content = null;
        final T addresses;

        try {
            final StatusLine status = response.getStatusLine();
            if (status.getStatusCode() >= HttpStatus.SC_BAD_REQUEST) {
                throw new IOException(String.format("HTTP error: %s %s", status.getStatusCode(), status.getReasonPhrase()));
            }
            content = response.getEntity().getContent();
            addresses = gsonInstance
                    .fromJson(new InputStreamReader(content, "utf-8"), responseType);
        } finally {
            if (null != content) {
                content.close();
            }
            response.getEntity().consumeContent();
        }

        return addresses;
    }
1341897
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		network_interface_responses result = (network_interface_responses) service.get_payload_formatter().string_to_resource(network_interface_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.network_interface_response_array);
		}
		network_interface[] result_network_interface = new network_interface[result.network_interface_response_array.length];
		
		for(int i = 0; i < result.network_interface_response_array.length; i++)
		{
			result_network_interface[i] = result.network_interface_response_array[i].network_interface[0];
		}
		
		return result_network_interface;
	}
180342
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		ssl_key_responses result = (ssl_key_responses) service.get_payload_formatter().string_to_resource(ssl_key_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.ssl_key_response_array);
		}
		ssl_key[] result_ssl_key = new ssl_key[result.ssl_key_response_array.length];
		
		for(int i = 0; i < result.ssl_key_response_array.length; i++)
		{
			result_ssl_key[i] = result.ssl_key_response_array[i].ssl_key[0];
		}
		
		return result_ssl_key;
	}
624491
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		managed_device_responses result = (managed_device_responses) service.get_payload_formatter().string_to_resource(managed_device_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.managed_device_response_array);
		}
		managed_device[] result_managed_device = new managed_device[result.managed_device_response_array.length];
		
		for(int i = 0; i < result.managed_device_response_array.length; i++)
		{
			result_managed_device[i] = result.managed_device_response_array[i].managed_device[0];
		}
		
		return result_managed_device;
	}
674607
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception
	{
		vm_device_responses result = (vm_device_responses) service.get_payload_formatter().string_to_resource(vm_device_responses.class, response);
		if(result.errorcode != 0)
		{
			if (result.errorcode == SESSION_NOT_EXISTS)
				service.clear_session();
			throw new nitro_exception(result.message, result.errorcode, (base_response [])result.vm_device_response_array);
		}
		vm_device[] result_vm_device = new vm_device[result.vm_device_response_array.length];
		
		for(int i = 0; i < result.vm_device_response_array.length; i++)
		{
			result_vm_device[i] = result.vm_device_response_array[i].vm_device[0];
		}
		
		return result_vm_device;
	}
329584
public Observable<List<TermList>> getAllTermListsAsync() {
        return getAllTermListsWithServiceResponseAsync().map(new Func1<ServiceResponse<List<TermList>>, List<TermList>>() {
            @Override
            public List<TermList> call(ServiceResponse<List<TermList>> response) {
                return response.body();
            }
        });
    }