
registerType('Core', (function () { function URLRequest() {} var __super = setSupertypeFromDomain(URLRequest, 'BasicObject', 'Core');

	Object.defineProperty(URLRequest.prototype, "URL", {
	outlet: true, 
	enumerable: true, get:function () { return this._URL; }, set:function (v) {if (!Object.hasOwnProperty(this, "_URL")) Object.defineProperty(this, "_URL", { writable: true, configurable: true }); this._URL = v; }});
	

	Object.defineProperty(URLRequest.prototype, "method", {
	outlet: true, 
	enumerable: true, get:function () { return this._method; }, set:function (v) {if (!Object.hasOwnProperty(this, "_method")) Object.defineProperty(this, "_method", { writable: true, configurable: true }); this._method = v; }});
	

	Object.defineProperty(URLRequest.prototype, "parameters", {
	outlet: true, 
	enumerable: true, 
		get: function () {
			if (!this._parameters) {
				Object.defineProperty(this, "_parameters", {
					value: {}, 
					configurable: true});
				
			}
			return this._parameters;
		}, set:function (v) {if (!Object.hasOwnProperty(this, "_parameters")) Object.defineProperty(this, "_parameters", { writable: true, configurable: true }); this._parameters = v; }});
	
	
	Object.defineProperty(URLRequest.prototype, "parameterizedURL", {
		get: function () {
			if (this.method === "POST") return this.URL;
			var result = this.URL + "?";
			for (var key in this.parameters) {
				result += encodeURIComponent(key) + "=" + encodeURIComponent(this.parameters[key]) + "&";
			}
			return result.substr(0, result.length-1);
		}});
	

URLRequest.prototype.initPropertiesFromData = function URLRequest_initPropertiesFromData(data) {
try { __super.prototype.initPropertiesFromData.call(this, data); } catch (err) {}
if (data.hasOwnProperty("URL")) this.URL = data.URL;
if (data.hasOwnProperty("method")) this.method = data.method;
if (data.hasOwnProperty("parameters")) this.parameters = data.parameters;
};

URLRequest.prototype.decodeData = function URLRequest_decodeData(data) { var decoded;
try { decoded = __super.prototype.decodeData.call(this, data); } catch (err) { console.warn(err); decoded = clone(data); }
return decoded; };

URLRequest.prototype.encode = function URLRequest_encode() { var encoded;
try { encoded = __super.prototype.encode.call(this); } catch (err) { console.warn(err); encoded = this.context.encodeObject(this); }
return encoded; };

URLRequest.prototype.encodeCloned = function URLRequest_encodeCloned() { var encoded;
try { encoded = __super.prototype.encodeCloned.call(this); } catch (err) { console.warn(err); encoded = {}; }
return encoded; };

URLRequest.prototype.expectedTypeForProperty = function URLRequest_expectedTypeForProperty(key) {
	if (key === "URL") return "";
	if (key === "method") return "";
	if (key === "parameters") return "";
	if (key === "parameterizedURL") return "";
	if (__super) return __super.prototype.expectedTypeForProperty(key);
};

return URLRequest; }()));