/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateBotResponse response = new CreateBotResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Bot", targetDepth)) { var unmarshaller = BotUnmarshaller.Instance; response.Bot = 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) { CreateBotResponse response = new CreateBotResponse(); 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("botName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BotName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("botStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.BotStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("botTags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.BotTags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("creationDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreationDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("dataPrivacy", targetDepth)) { var unmarshaller = DataPrivacyUnmarshaller.Instance; response.DataPrivacy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("idleSessionTTLInSeconds", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.IdleSessionTTLInSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("roleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("testBotAliasTags", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); response.TestBotAliasTags = unmarshaller.Unmarshall(context); continue; } } return(response); }