//
//	RootClass.swift
//	Model file Generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation

class LoginMsg:BaseOBJ{

	var allowPush : Int!
	var clientType : Int!
	var deviceToken : String!
	var uuid : String!
	var loginName : String!
	var password : String!
	var serverID : String!
    
//    
//    
//    NSString* serverID = Server_ID;
//    if (serverID) {
//    [_requestBody setObject:serverID forKey:@"serverId"];
//    }
    
//    NSString* deviceToken = [userDefaults objectForKey:USERDEFAULT_APP_TOKEN];
    
//    if (!!deviceToken) {
//    [_requestBody setObject:deviceToken forKey:@"deviceToken"];
//    }else{
    //获取唯一标识  appToken
//    NSString *uuid = [[NSUUID UUID] UUIDString];
//    [userDefaults setObject:uuid forKey:USERDEFAULT_APP_TOKEN];
//    [_requestBody setObject:uuid forKey:@"deviceToken"];
    
    
    

	/**
	 * Instantiate the instance using the passed dictionary values to set the properties values
	 */
	init(fromStringarr strarr: [String]){
		allowPush = 1
		clientType = 1
        deviceToken = NSUUID().UUIDString as String
		loginName = strarr[0]
		password = strarr[1]
		serverID = strarr[2]
	}
    
	/**
	 * Returns all the available property values in the form of NSDictionary object where the key is the approperiate json key and the value is the value of the corresponding property
	 */
    func toDictionary() -> NSDictionary
	{
		var dictionary = NSMutableDictionary()
		
        if serverID != nil{
            dictionary["serverID"] = serverID as String
        }
        if loginName != nil{
            dictionary["loginName"] = loginName as String
        }
        if password != nil{
            dictionary["password"] = password  as String
        }
        if clientType != nil{
            dictionary["clientType"] = clientType
        }
        if allowPush != nil{
			dictionary["allowPush"] = allowPush
		}
		if deviceToken != nil{
			dictionary["deviceToken"] = deviceToken as String
		}
		return dictionary
	}
}