/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateBotVersionResponse response = new CreateBotVersionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("botId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BotId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("botStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BotStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("botVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BotVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("botVersionLocaleSpecification", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, BotVersionLocaleDetails, StringUnmarshaller, BotVersionLocaleDetailsUnmarshaller>(StringUnmarshaller.Instance, BotVersionLocaleDetailsUnmarshaller.Instance); response.BotVersionLocaleSpecification = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("creationDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreationDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateBotVersionResponse response = new CreateBotVersionResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("abortStatement", targetDepth)) { var unmarshaller = StatementUnmarshaller.Instance; response.AbortStatement = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("checksum", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Checksum = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("childDirected", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.ChildDirected = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("clarificationPrompt", targetDepth)) { var unmarshaller = PromptUnmarshaller.Instance; response.ClarificationPrompt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("detectSentiment", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.DetectSentiment = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("enableModelImprovements", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.EnableModelImprovements = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("failureReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FailureReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("idleSessionTTLInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.IdleSessionTTLInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("intents", targetDepth)) { var unmarshaller = new ListUnmarshaller <Intent, IntentUnmarshaller>(IntentUnmarshaller.Instance); response.Intents = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("locale", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Locale = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("version", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Version = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("voiceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VoiceId = unmarshaller.Unmarshall(context); continue; } } return(response); }