示例#1
0
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            CreateDatasetResponse response = new CreateDatasetResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("datasetArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DatasetArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("datasetName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DatasetName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("retentionPeriod", targetDepth))
                {
                    var unmarshaller = RetentionPeriodUnmarshaller.Instance;
                    response.RetentionPeriod = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
        public static CreateDatasetResponse Unmarshall(UnmarshallerContext _ctx)
        {
            CreateDatasetResponse createDatasetResponse = new CreateDatasetResponse();

            createDatasetResponse.HttpResponse = _ctx.HttpResponse;
            createDatasetResponse.RequestId    = _ctx.StringValue("CreateDataset.RequestId");
            createDatasetResponse.DatasetId    = _ctx.StringValue("CreateDataset.DatasetId");
            createDatasetResponse.Code         = _ctx.IntegerValue("CreateDataset.Code");
            createDatasetResponse.Message      = _ctx.StringValue("CreateDataset.Message");
            createDatasetResponse.Success      = _ctx.BooleanValue("CreateDataset.Success");

            return(createDatasetResponse);
        }
        /// <summary>
        /// Unmarshaller the response from the service to the response class.
        /// </summary>
        /// <param name="context"></param>
        /// <returns></returns>
        public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context)
        {
            CreateDatasetResponse response = new CreateDatasetResponse();

            context.Read();
            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("DatasetMetadata", targetDepth))
                {
                    var unmarshaller = DatasetMetadataUnmarshaller.Instance;
                    response.DatasetMetadata = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }