ds/ipprot_nova/IpadClient.js

/**
 * @fileoverview This file is generated by BoosterClientGenerator, do not edit.
 *               If this file needs to change consider updating the exporter
 *               code and re-run the export.
 *
 * @author anders.rejdebrant@spark-vision.com (Anders Rejdebrant)
 */

goog.provide('spv.ds.ipprot_nova.IpadClient');

goog.require('goog.events.EventTarget');
goog.require('goog.json');
goog.require('goog.net.Jsonp');
goog.require('goog.net.XhrIo');
goog.require('goog.Uri.QueryData');
goog.require('spv.ds.ipprot_nova.boosterprotocol.BuildInfo');
goog.require('spv.ds.ipprot_nova.definition.Root');
goog.require('spv.ds.ipprot_nova.input.BopDisabledFlagMode');
goog.require('spv.ds.ipprot_nova.input.BopReadMoreMode');
goog.require('spv.ds.ipprot_nova.input.PresentationStructureQuery');
goog.require('spv.ds.ipprot_nova.output.BipAttempt');
goog.require('spv.ds.ipprot_nova.output.Bump');
goog.require('spv.ds.ipprot_nova.output.Category');
goog.require('spv.ds.ipprot_nova.output.ConfigBop');
goog.require('spv.ds.ipprot_nova.output.FacebookShareData');
goog.require('spv.ds.ipprot_nova.output.FreshConfig');
goog.require('spv.ds.ipprot_nova.output.GetConfigResult');
goog.require('spv.ds.ipprot_nova.output.GetItemResourcesResult');
goog.require('spv.ds.ipprot_nova.output.ImageResponse');
goog.require('spv.ds.ipprot_nova.output.OutBop');
goog.require('spv.ds.ipprot_nova.output.OutBopUpdate');
goog.require('spv.ds.ipprot_nova.output.OutResolvers');
goog.require('spv.ds.ipprot_nova.output.PdfGenerationResult');
goog.require('spv.ds.ipprot_nova.output.PresentationStructure');
goog.require('spv.ds.ipprot_nova.output.PublicConfigInfo');
goog.require('spv.ds.ipprot_nova.output.ReadMoreResources');
goog.require('spv.ds.ipprot_nova.output.SavedUser');
goog.require('spv.ds.ipprot_nova.output.SessionInitData');
goog.require('spv.ds.ipprot_nova.output.UserConfigInfo');



/**
 * @constructor
 * @struct
 * @param {string} service_url
 * @param {boolean} use_jsonp
 */
spv.ds.ipprot_nova.IpadClient = function(
	service_url,
	use_jsonp)
{
	this._service_url = service_url;
	if (use_jsonp)
	{
	    this._send_http_request = spv.ds.ipprot_nova.IpadClient.sendJsonpHttpRequest;
	    this._api_name = 'jsonp';
	}
	else
	{
	    this._send_http_request = spv.ds.ipprot_nova.IpadClient.sendJsonHttpRequest;
	    this._api_name = 'api';
	}
};




/**
 * @param {string} session_id
 * @param {Array.<string>} group_ids
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.add_gui_group_subscriptions = function(
	session_id,
	group_ids,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/add_gui_group_subscriptions';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('group_ids', typeof(group_ids) == "object" ? goog.json.serialize(group_ids) : group_ids);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} category
 * @param {string} input
 * @param {function(spv.ds.ipprot_nova.output.BipAttempt)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.attempt_bip = function(
	session_id,
	category,
	input,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/attempt_bip';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('category', typeof(category) == "object" ? goog.json.serialize(category) : category);
	query.set('input', typeof(input) == "object" ? goog.json.serialize(input) : input);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['attempt_bip']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} input
 * @param {string} language
 * @param {function(spv.ds.ipprot_nova.output.BipAttempt)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.attempt_bip_v2 = function(
	session_id,
	input,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/attempt_bip_v2';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('input', typeof(input) == "object" ? goog.json.serialize(input) : input);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['attempt_bip_v2']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} category
 * @param {string} input
 * @param {string} language
 * @param {function(spv.ds.ipprot_nova.output.OutBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.bip = function(
	session_id,
	category,
	input,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/bip';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('category', typeof(category) == "object" ? goog.json.serialize(category) : category);
	query.set('input', typeof(input) == "object" ? goog.json.serialize(input) : input);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['bip']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {function(spv.ds.ipprot_nova.boosterprotocol.BuildInfo)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.build_info = function(
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/build_info';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['build_info']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.clear_gui_group_subscriptions = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/clear_gui_group_subscriptions';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} menu_query
 * @param {spv.ds.ipprot_nova.input.BopReadMoreMode} readmore_mode
 * @param {string} language
 * @param {spv.ds.ipprot_nova.input.BopDisabledFlagMode} disabled_flag_mode
 * @param {number} ttl
 * @param {string} origin
 * @param {string} category
 * @param {string} item_interpreter_options
 * @param {function(spv.ds.ipprot_nova.output.SessionInitData)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.create_session = function(
	menu_query,
	readmore_mode,
	language,
	disabled_flag_mode,
	ttl,
	origin,
	category,
	item_interpreter_options,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/create_session';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('menu_query', typeof(menu_query) == "object" ? goog.json.serialize(menu_query) : menu_query);
	query.set('readmore_mode', typeof(readmore_mode) == "object" ? goog.json.serialize(readmore_mode) : readmore_mode);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	query.set('disabled_flag_mode', typeof(disabled_flag_mode) == "object" ? goog.json.serialize(disabled_flag_mode) : disabled_flag_mode);
	query.set('ttl', typeof(ttl) == "object" ? goog.json.serialize(ttl) : ttl);
	query.set('origin', typeof(origin) == "object" ? goog.json.serialize(origin) : origin);
	query.set('category', typeof(category) == "object" ? goog.json.serialize(category) : category);
	query.set('item_interpreter_options', typeof(item_interpreter_options) == "object" ? goog.json.serialize(item_interpreter_options) : item_interpreter_options);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['create_session']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} user_name
 * @param {string} password
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.create_user = function(
	session_id,
	user_name,
	password,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/create_user';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('password', typeof(password) == "object" ? goog.json.serialize(password) : password);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} ds_id
 * @param {function(Array.<string>)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.find_gui_paths = function(
	session_id,
	ds_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/find_gui_paths';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('ds_id', typeof(ds_id) == "object" ? goog.json.serialize(ds_id) : ds_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['find_gui_paths']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} template_name
 * @param {boolean} add_auto_print
 * @param {boolean} show_print_dialog
 * @param {function(spv.ds.ipprot_nova.output.PdfGenerationResult)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.generate_pdf = function(
	session_id,
	template_name,
	add_auto_print,
	show_print_dialog,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/generate_pdf';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('template_name', typeof(template_name) == "object" ? goog.json.serialize(template_name) : template_name);
	query.set('add_auto_print', typeof(add_auto_print) == "object" ? goog.json.serialize(add_auto_print) : add_auto_print);
	query.set('show_print_dialog', typeof(show_print_dialog) == "object" ? goog.json.serialize(show_print_dialog) : show_print_dialog);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['generate_pdf']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} conf_name
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.generate_public_config = function(
	session_id,
	conf_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/generate_public_config';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('conf_name', typeof(conf_name) == "object" ? goog.json.serialize(conf_name) : conf_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['generate_public_config']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} category
 * @param {string} language
 * @param {function(spv.ds.ipprot_nova.output.Bump)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_bump = function(
	session_id,
	category,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_bump';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('category', typeof(category) == "object" ? goog.json.serialize(category) : category);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_bump']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {function(Array.<spv.ds.ipprot_nova.output.Category>)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_categories = function(
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_categories';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_categories']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} encoding
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_config_as_string = function(
	session_id,
	encoding,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_config_as_string';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('encoding', typeof(encoding) == "object" ? goog.json.serialize(encoding) : encoding);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_config_as_string']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} encoded_config
 * @param {string} encoding
 * @param {number} scaled_width
 * @param {number} scaled_height
 * @param {string} serie_name
 * @param {number} frame
 * @param {number} crop_x_ratio
 * @param {number} crop_y_ratio
 * @param {number} cropped_width
 * @param {number} cropped_height
 * @param {string} skip
 * @param {string} skip_groups
 * @param {string} only_use
 * @param {string} only_use_groups
 * @param {string} file_type
 * @param {boolean} use_hd
 * @param {boolean} keep_aspect_ratio
 * @param {boolean} auto_crop
 * @param {string} bg_color_hex
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_config_image = function(
	encoded_config,
	encoding,
	scaled_width,
	scaled_height,
	serie_name,
	frame,
	crop_x_ratio,
	crop_y_ratio,
	cropped_width,
	cropped_height,
	skip,
	skip_groups,
	only_use,
	only_use_groups,
	file_type,
	use_hd,
	keep_aspect_ratio,
	auto_crop,
	bg_color_hex,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_config_image';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('encoded_config', typeof(encoded_config) == "object" ? goog.json.serialize(encoded_config) : encoded_config);
	query.set('encoding', typeof(encoding) == "object" ? goog.json.serialize(encoding) : encoding);
	query.set('scaled_width', typeof(scaled_width) == "object" ? goog.json.serialize(scaled_width) : scaled_width);
	query.set('scaled_height', typeof(scaled_height) == "object" ? goog.json.serialize(scaled_height) : scaled_height);
	query.set('serie_name', typeof(serie_name) == "object" ? goog.json.serialize(serie_name) : serie_name);
	query.set('frame', typeof(frame) == "object" ? goog.json.serialize(frame) : frame);
	query.set('crop_x_ratio', typeof(crop_x_ratio) == "object" ? goog.json.serialize(crop_x_ratio) : crop_x_ratio);
	query.set('crop_y_ratio', typeof(crop_y_ratio) == "object" ? goog.json.serialize(crop_y_ratio) : crop_y_ratio);
	query.set('cropped_width', typeof(cropped_width) == "object" ? goog.json.serialize(cropped_width) : cropped_width);
	query.set('cropped_height', typeof(cropped_height) == "object" ? goog.json.serialize(cropped_height) : cropped_height);
	query.set('skip', typeof(skip) == "object" ? goog.json.serialize(skip) : skip);
	query.set('skip_groups', typeof(skip_groups) == "object" ? goog.json.serialize(skip_groups) : skip_groups);
	query.set('only_use', typeof(only_use) == "object" ? goog.json.serialize(only_use) : only_use);
	query.set('only_use_groups', typeof(only_use_groups) == "object" ? goog.json.serialize(only_use_groups) : only_use_groups);
	query.set('file_type', typeof(file_type) == "object" ? goog.json.serialize(file_type) : file_type);
	query.set('use_hd', typeof(use_hd) == "object" ? goog.json.serialize(use_hd) : use_hd);
	query.set('keep_aspect_ratio', typeof(keep_aspect_ratio) == "object" ? goog.json.serialize(keep_aspect_ratio) : keep_aspect_ratio);
	query.set('auto_crop', typeof(auto_crop) == "object" ? goog.json.serialize(auto_crop) : auto_crop);
	query.set('bg_color_hex', typeof(bg_color_hex) == "object" ? goog.json.serialize(bg_color_hex) : bg_color_hex);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_config_image']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} encoded_config
 * @param {string} encoding
 * @param {number} output_width
 * @param {number} output_height
 * @param {string} serie_name
 * @param {number} frame
 * @param {string} file_type
 * @param {boolean} keep_aspect_ratio
 * @param {function(spv.ds.ipprot_nova.output.ImageResponse)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_config_image_light = function(
	encoded_config,
	encoding,
	output_width,
	output_height,
	serie_name,
	frame,
	file_type,
	keep_aspect_ratio,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_config_image_light';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('encoded_config', typeof(encoded_config) == "object" ? goog.json.serialize(encoded_config) : encoded_config);
	query.set('encoding', typeof(encoding) == "object" ? goog.json.serialize(encoding) : encoding);
	query.set('output_width', typeof(output_width) == "object" ? goog.json.serialize(output_width) : output_width);
	query.set('output_height', typeof(output_height) == "object" ? goog.json.serialize(output_height) : output_height);
	query.set('serie_name', typeof(serie_name) == "object" ? goog.json.serialize(serie_name) : serie_name);
	query.set('frame', typeof(frame) == "object" ? goog.json.serialize(frame) : frame);
	query.set('file_type', typeof(file_type) == "object" ? goog.json.serialize(file_type) : file_type);
	query.set('keep_aspect_ratio', typeof(keep_aspect_ratio) == "object" ? goog.json.serialize(keep_aspect_ratio) : keep_aspect_ratio);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_config_image_light']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(spv.ds.ipprot_nova.output.GetConfigResult)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_configs = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_configs';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_configs']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} scaled_width
 * @param {number} scaled_height
 * @param {string} serie_name
 * @param {number} frame
 * @param {number} crop_x_ratio
 * @param {number} crop_y_ratio
 * @param {number} cropped_width
 * @param {number} cropped_height
 * @param {string} skip
 * @param {string} skip_groups
 * @param {string} only_use
 * @param {string} only_use_groups
 * @param {string} file_type
 * @param {boolean} use_hd
 * @param {boolean} keep_aspect_ratio
 * @param {boolean} auto_crop
 * @param {string} bg_color_hex
 * @param {boolean} allow_padding
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_current_config_image = function(
	session_id,
	scaled_width,
	scaled_height,
	serie_name,
	frame,
	crop_x_ratio,
	crop_y_ratio,
	cropped_width,
	cropped_height,
	skip,
	skip_groups,
	only_use,
	only_use_groups,
	file_type,
	use_hd,
	keep_aspect_ratio,
	auto_crop,
	bg_color_hex,
	allow_padding,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_current_config_image';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('scaled_width', typeof(scaled_width) == "object" ? goog.json.serialize(scaled_width) : scaled_width);
	query.set('scaled_height', typeof(scaled_height) == "object" ? goog.json.serialize(scaled_height) : scaled_height);
	query.set('serie_name', typeof(serie_name) == "object" ? goog.json.serialize(serie_name) : serie_name);
	query.set('frame', typeof(frame) == "object" ? goog.json.serialize(frame) : frame);
	query.set('crop_x_ratio', typeof(crop_x_ratio) == "object" ? goog.json.serialize(crop_x_ratio) : crop_x_ratio);
	query.set('crop_y_ratio', typeof(crop_y_ratio) == "object" ? goog.json.serialize(crop_y_ratio) : crop_y_ratio);
	query.set('cropped_width', typeof(cropped_width) == "object" ? goog.json.serialize(cropped_width) : cropped_width);
	query.set('cropped_height', typeof(cropped_height) == "object" ? goog.json.serialize(cropped_height) : cropped_height);
	query.set('skip', typeof(skip) == "object" ? goog.json.serialize(skip) : skip);
	query.set('skip_groups', typeof(skip_groups) == "object" ? goog.json.serialize(skip_groups) : skip_groups);
	query.set('only_use', typeof(only_use) == "object" ? goog.json.serialize(only_use) : only_use);
	query.set('only_use_groups', typeof(only_use_groups) == "object" ? goog.json.serialize(only_use_groups) : only_use_groups);
	query.set('file_type', typeof(file_type) == "object" ? goog.json.serialize(file_type) : file_type);
	query.set('use_hd', typeof(use_hd) == "object" ? goog.json.serialize(use_hd) : use_hd);
	query.set('keep_aspect_ratio', typeof(keep_aspect_ratio) == "object" ? goog.json.serialize(keep_aspect_ratio) : keep_aspect_ratio);
	query.set('auto_crop', typeof(auto_crop) == "object" ? goog.json.serialize(auto_crop) : auto_crop);
	query.set('bg_color_hex', typeof(bg_color_hex) == "object" ? goog.json.serialize(bg_color_hex) : bg_color_hex);
	query.set('allow_padding', typeof(allow_padding) == "object" ? goog.json.serialize(allow_padding) : allow_padding);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_current_config_image']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(spv.ds.ipprot_nova.output.FacebookShareData)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_facebook_share_data = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_facebook_share_data';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_facebook_share_data']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {number} ctime
 * @param {number} limit
 * @param {string} meta_filter
 * @param {number} scale_width
 * @param {number} scale_height
 * @param {function(Array.<spv.ds.ipprot_nova.output.FreshConfig>)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_fresh_configs = function(
	ctime,
	limit,
	meta_filter,
	scale_width,
	scale_height,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_fresh_configs';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('ctime', typeof(ctime) == "object" ? goog.json.serialize(ctime) : ctime);
	query.set('limit', typeof(limit) == "object" ? goog.json.serialize(limit) : limit);
	query.set('meta_filter', typeof(meta_filter) == "object" ? goog.json.serialize(meta_filter) : meta_filter);
	query.set('scale_width', typeof(scale_width) == "object" ? goog.json.serialize(scale_width) : scale_width);
	query.set('scale_height', typeof(scale_height) == "object" ? goog.json.serialize(scale_height) : scale_height);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_fresh_configs']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} serie_index
 * @param {number} frame_index
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_image = function(
	session_id,
	serie_index,
	frame_index,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_image';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('serie_index', typeof(serie_index) == "object" ? goog.json.serialize(serie_index) : serie_index);
	query.set('frame_index', typeof(frame_index) == "object" ? goog.json.serialize(frame_index) : frame_index);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_image']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} serie_index
 * @param {number} frame_index
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_image_absolute_url = function(
	session_id,
	serie_index,
	frame_index,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_image_absolute_url';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('serie_index', typeof(serie_index) == "object" ? goog.json.serialize(serie_index) : serie_index);
	query.set('frame_index', typeof(frame_index) == "object" ? goog.json.serialize(frame_index) : frame_index);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_image_absolute_url']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} encoded_config
 * @param {string} enc_type
 * @param {?number} crop_x_ratio
 * @param {?number} crop_y_ratio
 * @param {number} cropped_width
 * @param {number} cropped_height
 * @param {boolean} auto_crop
 * @param {number} scaled_width
 * @param {number} scaled_height
 * @param {boolean} keep_aspect_ratio
 * @param {string} ext
 * @param {boolean} shadows
 * @param {boolean} main_image
 * @param {boolean} background
 * @param {boolean} use_hd
 * @param {string} serie
 * @param {number} frame
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_image_from_encoded_string = function(
	encoded_config,
	enc_type,
	crop_x_ratio,
	crop_y_ratio,
	cropped_width,
	cropped_height,
	auto_crop,
	scaled_width,
	scaled_height,
	keep_aspect_ratio,
	ext,
	shadows,
	main_image,
	background,
	use_hd,
	serie,
	frame,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_image_from_encoded_string';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('encoded_config', typeof(encoded_config) == "object" ? goog.json.serialize(encoded_config) : encoded_config);
	query.set('enc_type', typeof(enc_type) == "object" ? goog.json.serialize(enc_type) : enc_type);
	query.set('crop_x_ratio', typeof(crop_x_ratio) == "object" ? goog.json.serialize(crop_x_ratio) : crop_x_ratio);
	query.set('crop_y_ratio', typeof(crop_y_ratio) == "object" ? goog.json.serialize(crop_y_ratio) : crop_y_ratio);
	query.set('cropped_width', typeof(cropped_width) == "object" ? goog.json.serialize(cropped_width) : cropped_width);
	query.set('cropped_height', typeof(cropped_height) == "object" ? goog.json.serialize(cropped_height) : cropped_height);
	query.set('auto_crop', typeof(auto_crop) == "object" ? goog.json.serialize(auto_crop) : auto_crop);
	query.set('scaled_width', typeof(scaled_width) == "object" ? goog.json.serialize(scaled_width) : scaled_width);
	query.set('scaled_height', typeof(scaled_height) == "object" ? goog.json.serialize(scaled_height) : scaled_height);
	query.set('keep_aspect_ratio', typeof(keep_aspect_ratio) == "object" ? goog.json.serialize(keep_aspect_ratio) : keep_aspect_ratio);
	query.set('ext', typeof(ext) == "object" ? goog.json.serialize(ext) : ext);
	query.set('shadows', typeof(shadows) == "object" ? goog.json.serialize(shadows) : shadows);
	query.set('main_image', typeof(main_image) == "object" ? goog.json.serialize(main_image) : main_image);
	query.set('background', typeof(background) == "object" ? goog.json.serialize(background) : background);
	query.set('use_hd', typeof(use_hd) == "object" ? goog.json.serialize(use_hd) : use_hd);
	query.set('serie', typeof(serie) == "object" ? goog.json.serialize(serie) : serie);
	query.set('frame', typeof(frame) == "object" ? goog.json.serialize(frame) : frame);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} language
 * @param {function(spv.ds.ipprot_nova.output.OutResolvers)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_initial_consequence_of_change = function(
	session_id,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_initial_consequence_of_change';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_initial_consequence_of_change']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} item_ids
 * @param {string} language
 * @param {function(Array.<spv.ds.ipprot_nova.output.OutBopUpdate>)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_item_info = function(
	session_id,
	item_ids,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_item_info';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('item_ids', typeof(item_ids) == "object" ? goog.json.serialize(item_ids) : item_ids);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_item_info']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} category
 * @param {string} model
 * @param {string} language
 * @param {Array.<string>} item_ids
 * @param {Array.<string>} resource_keys
 * @param {function(spv.ds.ipprot_nova.output.GetItemResourcesResult)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_item_resources = function(
	category,
	model,
	language,
	item_ids,
	resource_keys,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_item_resources';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('category', typeof(category) == "object" ? goog.json.serialize(category) : category);
	query.set('model', typeof(model) == "object" ? goog.json.serialize(model) : model);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	query.set('item_ids', typeof(item_ids) == "object" ? goog.json.serialize(item_ids) : item_ids);
	query.set('resource_keys', typeof(resource_keys) == "object" ? goog.json.serialize(resource_keys) : resource_keys);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_item_resources']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} serie_index
 * @param {number} frame_index
 * @param {string} file_type
 * @param {boolean} separate_background
 * @param {boolean} separate_shadow
 * @param {boolean} all_frames
 * @param {boolean} use_hd
 * @param {number} aspect_ratio
 * @param {boolean} allow_padding
 * @param {number} image_width
 * @param {number} image_height
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_media_kit = function(
	session_id,
	serie_index,
	frame_index,
	file_type,
	separate_background,
	separate_shadow,
	all_frames,
	use_hd,
	aspect_ratio,
	allow_padding,
	image_width,
	image_height,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_media_kit';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('serie_index', typeof(serie_index) == "object" ? goog.json.serialize(serie_index) : serie_index);
	query.set('frame_index', typeof(frame_index) == "object" ? goog.json.serialize(frame_index) : frame_index);
	query.set('file_type', typeof(file_type) == "object" ? goog.json.serialize(file_type) : file_type);
	query.set('separate_background', typeof(separate_background) == "object" ? goog.json.serialize(separate_background) : separate_background);
	query.set('separate_shadow', typeof(separate_shadow) == "object" ? goog.json.serialize(separate_shadow) : separate_shadow);
	query.set('all_frames', typeof(all_frames) == "object" ? goog.json.serialize(all_frames) : all_frames);
	query.set('use_hd', typeof(use_hd) == "object" ? goog.json.serialize(use_hd) : use_hd);
	query.set('aspect_ratio', typeof(aspect_ratio) == "object" ? goog.json.serialize(aspect_ratio) : aspect_ratio);
	query.set('allow_padding', typeof(allow_padding) == "object" ? goog.json.serialize(allow_padding) : allow_padding);
	query.set('image_width', typeof(image_width) == "object" ? goog.json.serialize(image_width) : image_width);
	query.set('image_height', typeof(image_height) == "object" ? goog.json.serialize(image_height) : image_height);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_media_kit']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} filter_name
 * @param {Array.<string>} filter_query
 * @param {function(spv.ds.ipprot_nova.output.PresentationStructure)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_presentation_structure = function(
	session_id,
	filter_name,
	filter_query,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_presentation_structure';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('filter_name', typeof(filter_name) == "object" ? goog.json.serialize(filter_name) : filter_name);
	query.set('filter_query', typeof(filter_query) == "object" ? goog.json.serialize(filter_query) : filter_query);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_presentation_structure']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} filter_name
 * @param {spv.ds.ipprot_nova.input.PresentationStructureQuery} filter_query
 * @param {function(spv.ds.ipprot_nova.output.PresentationStructure)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_presentation_structure_v2 = function(
	session_id,
	filter_name,
	filter_query,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_presentation_structure_v2';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('filter_name', typeof(filter_name) == "object" ? goog.json.serialize(filter_name) : filter_name);
	query.set('filter_query', typeof(filter_query) == "object" ? goog.json.serialize(filter_query) : filter_query);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_presentation_structure_v2']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} item_id
 * @param {string} model
 * @param {string} category
 * @param {string} language
 * @param {function(spv.ds.ipprot_nova.output.ReadMoreResources)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_readmore = function(
	item_id,
	model,
	category,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_readmore';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('item_id', typeof(item_id) == "object" ? goog.json.serialize(item_id) : item_id);
	query.set('model', typeof(model) == "object" ? goog.json.serialize(model) : model);
	query.set('category', typeof(category) == "object" ? goog.json.serialize(category) : category);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_readmore']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} item_id
 * @param {function(spv.ds.ipprot_nova.output.OutResolvers)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_state_resolvers = function(
	session_id,
	item_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_state_resolvers';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('item_id', typeof(item_id) == "object" ? goog.json.serialize(item_id) : item_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_state_resolvers']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} config_name
 * @param {number} scaled_width
 * @param {number} scaled_height
 * @param {string} serie_name
 * @param {number} frame
 * @param {number} crop_x_ratio
 * @param {number} crop_y_ratio
 * @param {number} cropped_width
 * @param {number} cropped_height
 * @param {string} skip
 * @param {string} skip_groups
 * @param {string} only_use
 * @param {string} only_use_groups
 * @param {string} file_type
 * @param {boolean} use_hd
 * @param {boolean} keep_aspect_ratio
 * @param {boolean} auto_crop
 * @param {string} bg_color_hex
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.get_user_config_image = function(
	session_id,
	config_name,
	scaled_width,
	scaled_height,
	serie_name,
	frame,
	crop_x_ratio,
	crop_y_ratio,
	cropped_width,
	cropped_height,
	skip,
	skip_groups,
	only_use,
	only_use_groups,
	file_type,
	use_hd,
	keep_aspect_ratio,
	auto_crop,
	bg_color_hex,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/get_user_config_image';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	query.set('scaled_width', typeof(scaled_width) == "object" ? goog.json.serialize(scaled_width) : scaled_width);
	query.set('scaled_height', typeof(scaled_height) == "object" ? goog.json.serialize(scaled_height) : scaled_height);
	query.set('serie_name', typeof(serie_name) == "object" ? goog.json.serialize(serie_name) : serie_name);
	query.set('frame', typeof(frame) == "object" ? goog.json.serialize(frame) : frame);
	query.set('crop_x_ratio', typeof(crop_x_ratio) == "object" ? goog.json.serialize(crop_x_ratio) : crop_x_ratio);
	query.set('crop_y_ratio', typeof(crop_y_ratio) == "object" ? goog.json.serialize(crop_y_ratio) : crop_y_ratio);
	query.set('cropped_width', typeof(cropped_width) == "object" ? goog.json.serialize(cropped_width) : cropped_width);
	query.set('cropped_height', typeof(cropped_height) == "object" ? goog.json.serialize(cropped_height) : cropped_height);
	query.set('skip', typeof(skip) == "object" ? goog.json.serialize(skip) : skip);
	query.set('skip_groups', typeof(skip_groups) == "object" ? goog.json.serialize(skip_groups) : skip_groups);
	query.set('only_use', typeof(only_use) == "object" ? goog.json.serialize(only_use) : only_use);
	query.set('only_use_groups', typeof(only_use_groups) == "object" ? goog.json.serialize(only_use_groups) : only_use_groups);
	query.set('file_type', typeof(file_type) == "object" ? goog.json.serialize(file_type) : file_type);
	query.set('use_hd', typeof(use_hd) == "object" ? goog.json.serialize(use_hd) : use_hd);
	query.set('keep_aspect_ratio', typeof(keep_aspect_ratio) == "object" ? goog.json.serialize(keep_aspect_ratio) : keep_aspect_ratio);
	query.set('auto_crop', typeof(auto_crop) == "object" ? goog.json.serialize(auto_crop) : auto_crop);
	query.set('bg_color_hex', typeof(bg_color_hex) == "object" ? goog.json.serialize(bg_color_hex) : bg_color_hex);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['get_user_config_image']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.heartbeat = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/heartbeat';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['heartbeat']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {function(spv.ds.ipprot_nova.definition.Root)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.init_settings = function(
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/init_settings';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['init_settings']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.initialize_session = function(
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/initialize_session';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['initialize_session']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} conf_name
 * @param {function(spv.ds.ipprot_nova.output.ConfigBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.load_config = function(
	session_id,
	conf_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/load_config';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('conf_name', typeof(conf_name) == "object" ? goog.json.serialize(conf_name) : conf_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['load_config']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} config
 * @param {string} encoding
 * @param {string} language
 * @param {string} memorize_mode
 * @param {function(spv.ds.ipprot_nova.output.ConfigBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.load_config_from_string = function(
	session_id,
	config,
	encoding,
	language,
	memorize_mode,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/load_config_from_string';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('config', typeof(config) == "object" ? goog.json.serialize(config) : config);
	query.set('encoding', typeof(encoding) == "object" ? goog.json.serialize(encoding) : encoding);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	query.set('memorize_mode', typeof(memorize_mode) == "object" ? goog.json.serialize(memorize_mode) : memorize_mode);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['load_config_from_string']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} conf_name
 * @param {function(spv.ds.ipprot_nova.output.ConfigBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.load_public_config = function(
	session_id,
	conf_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/load_public_config';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('conf_name', typeof(conf_name) == "object" ? goog.json.serialize(conf_name) : conf_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['load_public_config']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} user_name
 * @param {string} password
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.login = function(
	session_id,
	user_name,
	password,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/login';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('password', typeof(password) == "object" ? goog.json.serialize(password) : password);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['login']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.logout = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/logout';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['logout']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} public_config_id
 * @param {function(spv.ds.ipprot_nova.output.PublicConfigInfo)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.public_config_v2_info = function(
	public_config_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/public_config_v2_info';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('public_config_id', typeof(public_config_id) == "object" ? goog.json.serialize(public_config_id) : public_config_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['public_config_v2_info']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} public_config_id
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.public_config_v2_load = function(
	session_id,
	public_config_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/public_config_v2_load';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('public_config_id', typeof(public_config_id) == "object" ? goog.json.serialize(public_config_id) : public_config_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} description
 * @param {Object.<string, string>} config_storage_aux
 * @param {function(spv.ds.ipprot_nova.output.PublicConfigInfo)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.public_config_v2_save = function(
	session_id,
	description,
	config_storage_aux,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/public_config_v2_save';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('description', typeof(description) == "object" ? goog.json.serialize(description) : description);
	query.set('config_storage_aux', typeof(config_storage_aux) == "object" ? goog.json.serialize(config_storage_aux) : config_storage_aux);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['public_config_v2_save']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} language
 * @param {function(spv.ds.ipprot_nova.output.OutBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.rebop = function(
	session_id,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/rebop';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['rebop']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} conf_name
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.remove_config = function(
	session_id,
	conf_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/remove_config';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('conf_name', typeof(conf_name) == "object" ? goog.json.serialize(conf_name) : conf_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['remove_config']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(spv.ds.ipprot_nova.output.OutBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.reset = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/reset';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['reset']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} token
 * @param {string} new_password
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.reset_password = function(
	token,
	new_password,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/reset_password';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('token', typeof(token) == "object" ? goog.json.serialize(token) : token);
	query.set('new_password', typeof(new_password) == "object" ? goog.json.serialize(new_password) : new_password);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} conf_name
 * @param {boolean} allow_overwrite
 * @param {function(string)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.save_config = function(
	session_id,
	conf_name,
	allow_overwrite,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/save_config';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('conf_name', typeof(conf_name) == "object" ? goog.json.serialize(conf_name) : conf_name);
	query.set('allow_overwrite', typeof(allow_overwrite) == "object" ? goog.json.serialize(allow_overwrite) : allow_overwrite);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['save_config']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} main_url
 * @param {string} user_name
 * @param {string} language
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.send_reset_password_mail = function(
	session_id,
	main_url,
	user_name,
	language,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/send_reset_password_mail';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('main_url', typeof(main_url) == "object" ? goog.json.serialize(main_url) : main_url);
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('language', typeof(language) == "object" ? goog.json.serialize(language) : language);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.session_has_logged_in_user = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/session_has_logged_in_user';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['session_has_logged_in_user']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} menu_query
 * @param {function(spv.ds.ipprot_nova.output.OutBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.set_menu_query = function(
	session_id,
	menu_query,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/set_menu_query';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('menu_query', typeof(menu_query) == "object" ? goog.json.serialize(menu_query) : menu_query);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['set_menu_query']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} lid
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.set_price_localization = function(
	session_id,
	lid,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/set_price_localization';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('lid', typeof(lid) == "object" ? goog.json.serialize(lid) : lid);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['set_price_localization']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.test_internal_server_error = function(
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/test_internal_server_error';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['test_internal_server_error']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} config_name
 * @param {string} flag
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_add_flag = function(
	user_name,
	config_name,
	flag,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_add_flag';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	query.set('flag', typeof(flag) == "object" ? goog.json.serialize(flag) : flag);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_add_flag']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} flag
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_add_flag_to_all = function(
	user_name,
	flag,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_add_flag_to_all';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('flag', typeof(flag) == "object" ? goog.json.serialize(flag) : flag);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_add_flag_to_all']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} flag
 * @param {Array.<string>} ignore_flags
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_add_flag_to_all_ignoring_flags = function(
	user_name,
	flag,
	ignore_flags,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_add_flag_to_all_ignoring_flags';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('flag', typeof(flag) == "object" ? goog.json.serialize(flag) : flag);
	query.set('ignore_flags', typeof(ignore_flags) == "object" ? goog.json.serialize(ignore_flags) : ignore_flags);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_add_flag_to_all_ignoring_flags']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {function(spv.ds.ipprot_nova.output.SavedUser)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_list = function(
	user_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_list';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_list']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {Array.<string>} ignore_flags
 * @param {function(spv.ds.ipprot_nova.output.SavedUser)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_list_ignoring_flags = function(
	user_name,
	ignore_flags,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_list_ignoring_flags';
	var http_method = 'GET';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('ignore_flags', typeof(ignore_flags) == "object" ? goog.json.serialize(ignore_flags) : ignore_flags);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_list_ignoring_flags']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} user_name
 * @param {string} config_name
 * @param {function(spv.ds.ipprot_nova.output.ConfigBop)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_load = function(
	session_id,
	user_name,
	config_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_load';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_load']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_remove_all_configs = function(
	user_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_remove_all_configs';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} config_name
 * @param {string} flag
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_remove_flag = function(
	user_name,
	config_name,
	flag,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_remove_flag';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	query.set('flag', typeof(flag) == "object" ? goog.json.serialize(flag) : flag);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_remove_flag']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} flag
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_remove_flag_from_all = function(
	user_name,
	flag,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_remove_flag_from_all';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('flag', typeof(flag) == "object" ? goog.json.serialize(flag) : flag);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_remove_flag_from_all']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} flag
 * @param {Array.<string>} ignore_flags
 * @param {function(boolean)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_remove_flag_from_all_ignoring_flags = function(
	user_name,
	flag,
	ignore_flags,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_remove_flag_from_all_ignoring_flags';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('flag', typeof(flag) == "object" ? goog.json.serialize(flag) : flag);
	query.set('ignore_flags', typeof(ignore_flags) == "object" ? goog.json.serialize(ignore_flags) : ignore_flags);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_remove_flag_from_all_ignoring_flags']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_remove_user = function(
	user_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_remove_user';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} user_name
 * @param {string} config_name
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_remove_user_config = function(
	user_name,
	config_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_remove_user_config';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} user_name
 * @param {string} config_name
 * @param {boolean} allow_overwrite
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_save = function(
	session_id,
	user_name,
	config_name,
	allow_overwrite,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_save';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	query.set('allow_overwrite', typeof(allow_overwrite) == "object" ? goog.json.serialize(allow_overwrite) : allow_overwrite);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} user_name
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_save_user_data = function(
	session_id,
	user_name,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_save_user_data';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_name', typeof(user_name) == "object" ? goog.json.serialize(user_name) : user_name);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} user_config_id
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_v2_delete = function(
	session_id,
	user_config_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_v2_delete';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_config_id', typeof(user_config_id) == "object" ? goog.json.serialize(user_config_id) : user_config_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {function(Array.<spv.ds.ipprot_nova.output.UserConfigInfo>)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_v2_list = function(
	session_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_v2_list';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_v2_list']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} user_config_id
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_v2_load = function(
	session_id,
	user_config_id,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_v2_load';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_config_id', typeof(user_config_id) == "object" ? goog.json.serialize(user_config_id) : user_config_id);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {number} user_config_id
 * @param {string} description
 * @param {Object.<string, string>} user_config_aux
 * @param {Object.<string, string>} config_storage_aux
 * @param {Function} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_v2_save = function(
	session_id,
	user_config_id,
	description,
	user_config_aux,
	config_storage_aux,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_v2_save';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('user_config_id', typeof(user_config_id) == "object" ? goog.json.serialize(user_config_id) : user_config_id);
	query.set('description', typeof(description) == "object" ? goog.json.serialize(description) : description);
	query.set('user_config_aux', typeof(user_config_aux) == "object" ? goog.json.serialize(user_config_aux) : user_config_aux);
	query.set('config_storage_aux', typeof(config_storage_aux) == "object" ? goog.json.serialize(config_storage_aux) : config_storage_aux);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success();
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		true,
		on_http_success,
		on_failure);
};




/**
 * @param {string} session_id
 * @param {string} config_name
 * @param {string} description
 * @param {Object.<string, string>} user_config_aux
 * @param {Object.<string, string>} config_storage_aux
 * @param {function(number)} on_success
 * @param {function(Error)} on_failure
 */
spv.ds.ipprot_nova.IpadClient.prototype.user_config_v2_save_as = function(
	session_id,
	config_name,
	description,
	user_config_aux,
	config_storage_aux,
	on_success,
	on_failure)
{
	var full_url = this._service_url + '/' + this._api_name + '/user_config_v2_save_as';
	var http_method = 'POST';
	var query = new goog.Uri.QueryData();
	query.set('session_id', typeof(session_id) == "object" ? goog.json.serialize(session_id) : session_id);
	query.set('config_name', typeof(config_name) == "object" ? goog.json.serialize(config_name) : config_name);
	query.set('description', typeof(description) == "object" ? goog.json.serialize(description) : description);
	query.set('user_config_aux', typeof(user_config_aux) == "object" ? goog.json.serialize(user_config_aux) : user_config_aux);
	query.set('config_storage_aux', typeof(config_storage_aux) == "object" ? goog.json.serialize(config_storage_aux) : config_storage_aux);
	/** @type {function(Object)} */
	var on_http_success = function(result_obj)
	{
		on_success(result_obj['user_config_v2_save_as']);
	}
	this._send_http_request(
		full_url,
		http_method,
		query,
		false,
		on_http_success,
		on_failure);
};




/**
* @export
* @struct
* @constructor
* @extends {Error}
*/
spv.ds.ipprot_nova.IpadClient.ProtocolError = function ProtocolError(error_carrier_object) {
	Error.call(this, error_carrier_object['message']);

	/**
	    * @nocollapse
	    * @type {string}
	    */
	this.name = error_carrier_object['name'];
	/**
	    * @nocollapse
	    * @type {string}
	    */
	this.status = error_carrier_object['status'];
	/**
	 * @nocollapse
	 * @type {string}
	 */
	this.sub_status = error_carrier_object['sub_status'];
	/**
	 * @nocollapse
	 * @type {string}
	 */
	this.message = error_carrier_object['message'];
	/**
	 * @nocollapse
	 * @type {Object}
	 */
	this.error_carrier = error_carrier_object;
}

goog.inherits(spv.ds.ipprot_nova.IpadClient.ProtocolError, Error);


(function() {

	var jsonp_timeout_ms = 60 * 1000 * 10;


/**
 * @private
 * @param {goog.Uri.QueryData} query
 * @return {string}
 */
spv.ds.ipprot_nova.IpadClient.makeSpecialQueryString = function(query) {
	var result = '';
	var keys = query.getKeys();
	for (var i = 0; i < keys.length; i++) {
		if (0 != i) {
			result += '&';
		}
		var key = keys[i];
		var val = query.get(key, '').toString();
		var val_enc = encodeURIComponent(val);
		result += keys[i] + '=' + val_enc;
	}
	return result;
}


/**
 * @private
 * @param {goog.net.XhrIo} xhr
 */
spv.ds.ipprot_nova.IpadClient.getProtocolErrorMessage = function(xhr) {
	var mess = 'protocol error: ' + xhr.getStatusText();
	mess += ', ' + xhr.getResponseText();
	return mess;
}


/**
 * @private
 * @param {goog.Uri.QueryData} query
 * @return {Object}
 */
spv.ds.ipprot_nova.IpadClient.makeJsonpPayload = function(query) {
	var result = {};
	var keys = query.getKeys();
	for (var i = 0; i < keys.length; i++) {
		var key = keys[i];
		result[key] = query.get(key);
	}
	var t = new Date().getTime();
	result['cachebuster'] = t;
	return result;
}


/**
 * @private
 * @param {Object} response
 * @return {Error}
 */
spv.ds.ipprot_nova.IpadClient.makeResponseError = function(response) {
	var message = 'Jsonp error: ';
	var error_carrier = spv.ds.ipprot_nova.IpadClient.getResponseErrorCarrier(response);
	if (null == error_carrier) {
		message += 'no error information available';
		return new Error(message);
	}

	return new spv.ds.ipprot_nova.IpadClient.ProtocolError(error_carrier);
}


/**
 * @private
 * @param {Object} response
 * @return {Object|null}
 */
spv.ds.ipprot_nova.IpadClient.getResponseErrorCarrier = function(response) {
	if (!response) {
		return null;
	}
	if (!response['error']) {
		return null;
	}
	return response['error'];
}


/**
 * @private
 * @param {Object} response
 * @return {boolean}
 */
spv.ds.ipprot_nova.IpadClient.hasErrorCarrier = function(response) {
	return null != spv.ds.ipprot_nova.IpadClient.getResponseErrorCarrier(response);
}


/**
 * @private
 * @param {string}             url
 * @param {string}             http_method
 * @param {goog.Uri.QueryData} query
 * @param {boolean}            return_is_void
 * @param {function(Object)}   on_success
 * @param {function(Error)}    on_failure
 */
spv.ds.ipprot_nova.IpadClient.sendJsonHttpRequest = function(
	url,
	http_method,
	query,
	return_is_void,
	on_success,
	on_failure) {
	var handleReply = replyHandler(return_is_void, on_success, on_failure);

	function xhrio_callback(e) {
		var xhr = e.target;
		if (!xhr.isSuccess()) {
			var statusCode = xhr.getStatus();
			var err = new Error("Protocol request failed: " + xhr.getStatusText());
			err.connectionStatusCode = statusCode;
			// Timeout will result in -1 and anything above 500 is about the server not being able to answer correctly.
			if (statusCode <= 0 || statusCode >= 501) {
				err.status = "ServiceUnavailable";
				return on_failure(err);
			}
			if (statusCode === 500) {
				err.status = "ServiceFailure";
				// no return, may have a response body.
			}
		}
		try {
			var reply = xhr.getResponseJson();
			handleReply(reply);
		} catch (response_err) {
			var dump = spv.ds.ipprot_nova.IpadClient.getProtocolErrorMessage(xhr);
			response_err.message += '\n' + dump;
			on_failure(response_err);
		}
	}

	if ('POST' == http_method || 'GET' == http_method) {
		var body_query = spv.ds.ipprot_nova.IpadClient.makeSpecialQueryString(query);
		goog.net.XhrIo.send(url, xhrio_callback, 'POST', body_query);
	} else {
		throw new Error('Method not supported: ' + http_method);
	}
};


/**
 * @private
 * @param {string}             url
 * @param {string}             http_method
 * @param {goog.Uri.QueryData} query
 * @param {boolean}            return_is_void
 * @param {function(Object)}   on_success
 * @param {function(Error)}    on_failure
 */
spv.ds.ipprot_nova.IpadClient.sendJsonpHttpRequest = function(
	url,
	http_method,
	query,
	return_is_void,
	on_success,
	on_failure) {
	var on_jsonp_reply = replyHandler(return_is_void, on_success, on_failure);
	var on_jsonp_error = function(response) {
		var jsonp_error = spv.ds.ipprot_nova.IpadClient.makeResponseError(response);
		on_failure(jsonp_error);
	};
	var payload = spv.ds.ipprot_nova.IpadClient.makeJsonpPayload(query);
	var jp = new goog.net.Jsonp(url);
	jp.setRequestTimeout(jsonp_timeout_ms);
	jp.send(payload, on_jsonp_reply, on_jsonp_error);
};


function replyHandler(
	return_is_void,
	on_success,
	on_failure) {
	return function(response) {
		try {
			if (spv.ds.ipprot_nova.IpadClient.hasErrorCarrier(response)) {
				var err = spv.ds.ipprot_nova.IpadClient.makeResponseError(response);
				throw err;
			}
			if (return_is_void) {
				on_success(null);
				return;
			}
			on_success(response);
		} catch (response_err) {
			on_failure(response_err);
		}
	}
}

})();