public static UpdateQuestModelMasterRequest FromDict(JsonData data)
 {
     return(new UpdateQuestModelMasterRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         questGroupName = data.Keys.Contains("questGroupName") && data["questGroupName"] != null ? data["questGroupName"].ToString(): null,
         questName = data.Keys.Contains("questName") && data["questName"] != null ? data["questName"].ToString(): null,
         description = data.Keys.Contains("description") && data["description"] != null ? data["description"].ToString(): null,
         metadata = data.Keys.Contains("metadata") && data["metadata"] != null ? data["metadata"].ToString(): null,
         contents = data.Keys.Contains("contents") && data["contents"] != null ? data["contents"].Cast <JsonData>().Select(value =>
         {
             return Contents.FromDict(value);
         }
                                                                                                                           ).ToList() : null,
         challengePeriodEventId = data.Keys.Contains("challengePeriodEventId") && data["challengePeriodEventId"] != null ? data["challengePeriodEventId"].ToString(): null,
         consumeActions = data.Keys.Contains("consumeActions") && data["consumeActions"] != null ? data["consumeActions"].Cast <JsonData>().Select(value =>
         {
             return ConsumeAction.FromDict(value);
         }
                                                                                                                                                   ).ToList() : null,
         failedAcquireActions = data.Keys.Contains("failedAcquireActions") && data["failedAcquireActions"] != null ? data["failedAcquireActions"].Cast <JsonData>().Select(value =>
         {
             return AcquireAction.FromDict(value);
         }
                                                                                                                                                                           ).ToList() : null,
         premiseQuestNames = data.Keys.Contains("premiseQuestNames") && data["premiseQuestNames"] != null ? data["premiseQuestNames"].Cast <JsonData>().Select(value =>
         {
             return value.ToString();
         }
                                                                                                                                                               ).ToList() : null,
     });
 }
Exemple #2
0
 public static UpdateRateModelMasterRequest FromDict(JsonData data)
 {
     return(new UpdateRateModelMasterRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         rateName = data.Keys.Contains("rateName") && data["rateName"] != null ? data["rateName"].ToString(): null,
         description = data.Keys.Contains("description") && data["description"] != null ? data["description"].ToString(): null,
         metadata = data.Keys.Contains("metadata") && data["metadata"] != null ? data["metadata"].ToString(): null,
         timingType = data.Keys.Contains("timingType") && data["timingType"] != null ? data["timingType"].ToString(): null,
         lockTime = data.Keys.Contains("lockTime") && data["lockTime"] != null ? (int?)int.Parse(data["lockTime"].ToString()) : null,
         enableSkip = data.Keys.Contains("enableSkip") && data["enableSkip"] != null ? (bool?)bool.Parse(data["enableSkip"].ToString()) : null,
         skipConsumeActions = data.Keys.Contains("skipConsumeActions") && data["skipConsumeActions"] != null ? data["skipConsumeActions"].Cast <JsonData>().Select(value =>
         {
             return ConsumeAction.FromDict(value);
         }
                                                                                                                                                                   ).ToList() : null,
         acquireActions = data.Keys.Contains("acquireActions") && data["acquireActions"] != null ? data["acquireActions"].Cast <JsonData>().Select(value =>
         {
             return AcquireAction.FromDict(value);
         }
                                                                                                                                                   ).ToList() : null,
         consumeActions = data.Keys.Contains("consumeActions") && data["consumeActions"] != null ? data["consumeActions"].Cast <JsonData>().Select(value =>
         {
             return ConsumeAction.FromDict(value);
         }
                                                                                                                                                   ).ToList() : null,
     });
 }
 public static CreateGlobalMessageMasterRequest FromDict(JsonData data)
 {
     return(new CreateGlobalMessageMasterRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         name = data.Keys.Contains("name") && data["name"] != null ? data["name"].ToString(): null,
         metadata = data.Keys.Contains("metadata") && data["metadata"] != null ? data["metadata"].ToString(): null,
         readAcquireActions = data.Keys.Contains("readAcquireActions") && data["readAcquireActions"] != null ? data["readAcquireActions"].Cast <JsonData>().Select(value =>
         {
             return AcquireAction.FromDict(value);
         }
                                                                                                                                                                   ).ToList() : null,
         expiresTimeSpan = data.Keys.Contains("expiresTimeSpan") && data["expiresTimeSpan"] != null?global::Gs2.Gs2Inbox.Model.TimeSpan.FromDict(data["expiresTimeSpan"]) : null,
                               expiresAt = data.Keys.Contains("expiresAt") && data["expiresAt"] != null ? (long?)long.Parse(data["expiresAt"].ToString()) : null,
     });
 }
 public static SendMessageByUserIdRequest FromDict(JsonData data)
 {
     return(new SendMessageByUserIdRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         userId = data.Keys.Contains("userId") && data["userId"] != null ? data["userId"].ToString(): null,
         metadata = data.Keys.Contains("metadata") && data["metadata"] != null ? data["metadata"].ToString(): null,
         readAcquireActions = data.Keys.Contains("readAcquireActions") && data["readAcquireActions"] != null ? data["readAcquireActions"].Cast <JsonData>().Select(value =>
         {
             return AcquireAction.FromDict(value);
         }
                                                                                                                                                                   ).ToList() : null,
         expiresAt = data.Keys.Contains("expiresAt") && data["expiresAt"] != null ? (long?)long.Parse(data["expiresAt"].ToString()) : null,
         expiresTimeSpan = data.Keys.Contains("expiresTimeSpan") && data["expiresTimeSpan"] != null?global::Gs2.Gs2Inbox.Model.TimeSpan.FromDict(data["expiresTimeSpan"]) : null,
                               duplicationAvoider = data.Keys.Contains("duplicationAvoider") && data["duplicationAvoider"] != null ? data["duplicationAvoider"].ToString(): null,
     });
 }
 public static UpdateSalesItemMasterRequest FromDict(JsonData data)
 {
     return(new UpdateSalesItemMasterRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         salesItemName = data.Keys.Contains("salesItemName") && data["salesItemName"] != null ? data["salesItemName"].ToString(): null,
         description = data.Keys.Contains("description") && data["description"] != null ? data["description"].ToString(): null,
         metadata = data.Keys.Contains("metadata") && data["metadata"] != null ? data["metadata"].ToString(): null,
         consumeActions = data.Keys.Contains("consumeActions") && data["consumeActions"] != null ? data["consumeActions"].Cast <JsonData>().Select(value =>
         {
             return ConsumeAction.FromDict(value);
         }
                                                                                                                                                   ).ToList() : null,
         acquireActions = data.Keys.Contains("acquireActions") && data["acquireActions"] != null ? data["acquireActions"].Cast <JsonData>().Select(value =>
         {
             return AcquireAction.FromDict(value);
         }
                                                                                                                                                   ).ToList() : null,
     });
 }
 public static CreateMissionTaskModelMasterRequest FromDict(JsonData data)
 {
     return(new CreateMissionTaskModelMasterRequest {
         namespaceName = data.Keys.Contains("namespaceName") && data["namespaceName"] != null ? data["namespaceName"].ToString(): null,
         missionGroupName = data.Keys.Contains("missionGroupName") && data["missionGroupName"] != null ? data["missionGroupName"].ToString(): null,
         name = data.Keys.Contains("name") && data["name"] != null ? data["name"].ToString(): null,
         metadata = data.Keys.Contains("metadata") && data["metadata"] != null ? data["metadata"].ToString(): null,
         description = data.Keys.Contains("description") && data["description"] != null ? data["description"].ToString(): null,
         counterName = data.Keys.Contains("counterName") && data["counterName"] != null ? data["counterName"].ToString(): null,
         targetValue = data.Keys.Contains("targetValue") && data["targetValue"] != null ? (long?)long.Parse(data["targetValue"].ToString()) : null,
         completeAcquireActions = data.Keys.Contains("completeAcquireActions") && data["completeAcquireActions"] != null ? data["completeAcquireActions"].Cast <JsonData>().Select(value =>
         {
             return AcquireAction.FromDict(value);
         }
                                                                                                                                                                                   ).ToList() : null,
         challengePeriodEventId = data.Keys.Contains("challengePeriodEventId") && data["challengePeriodEventId"] != null ? data["challengePeriodEventId"].ToString(): null,
         premiseMissionTaskName = data.Keys.Contains("premiseMissionTaskName") && data["premiseMissionTaskName"] != null ? data["premiseMissionTaskName"].ToString(): null,
     });
 }