/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateVocabularyResponse response = new CreateVocabularyResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VocabularyArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VocabularyArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VocabularyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VocabularyId = 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) { CreateVocabularyResponse response = new CreateVocabularyResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("FailureReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.FailureReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LanguageCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LanguageCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VocabularyName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VocabularyName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VocabularyState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VocabularyState = unmarshaller.Unmarshall(context); continue; } } return(response); }