Example #1
0
        public static DescribeImageResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeImageResponse describeImageResponse = new DescribeImageResponse();

            describeImageResponse.HttpResponse = context.HttpResponse;
            describeImageResponse.RequestId    = context.StringValue("DescribeImage.RequestId");

            DescribeImageResponse.DescribeImage_ImageInfo imageInfo = new DescribeImageResponse.DescribeImage_ImageInfo();
            imageInfo.System                = context.StringValue("DescribeImage.ImageInfo.System");
            imageInfo.Type                  = context.StringValue("DescribeImage.ImageInfo.Type");
            imageInfo.Status                = context.StringValue("DescribeImage.ImageInfo.Status");
            imageInfo.ImageId               = context.StringValue("DescribeImage.ImageInfo.ImageId");
            imageInfo.UpdateDateTime        = context.StringValue("DescribeImage.ImageInfo.UpdateDateTime");
            imageInfo.Repository            = context.StringValue("DescribeImage.ImageInfo.Repository");
            imageInfo.Tag                   = context.StringValue("DescribeImage.ImageInfo.Tag");
            describeImageResponse.ImageInfo = imageInfo;

            return(describeImageResponse);
        }
Example #2
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)
        {
            DescribeImageResponse response = new DescribeImageResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("CreationTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreationTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("Description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("DisplayName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.DisplayName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("FailureReason", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FailureReason = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ImageArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ImageArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ImageName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ImageName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("ImageStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.ImageStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("LastModifiedTime", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.LastModifiedTime = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("RoleArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.RoleArn = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }