public StorediSCSIVolume Unmarshall(JsonUnmarshallerContext context)
        {
            StorediSCSIVolume storediSCSIVolume = new StorediSCSIVolume();

            int originalDepth = context.CurrentDepth;
            int targetDepth   = originalDepth + 1;

            while (context.Read())
            {
                if ((context.IsKey) && (context.CurrentDepth == targetDepth))
                {
                    context.Read();
                    context.Read();

                    if (context.TestExpression("VolumeARN", targetDepth))
                    {
                        storediSCSIVolume.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeId", targetDepth))
                    {
                        storediSCSIVolume.VolumeId = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeType", targetDepth))
                    {
                        storediSCSIVolume.VolumeType = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeStatus", targetDepth))
                    {
                        storediSCSIVolume.VolumeStatus = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeSizeInBytes", targetDepth))
                    {
                        storediSCSIVolume.VolumeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeProgress", targetDepth))
                    {
                        storediSCSIVolume.VolumeProgress = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeDiskId", targetDepth))
                    {
                        storediSCSIVolume.VolumeDiskId = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("SourceSnapshotId", targetDepth))
                    {
                        storediSCSIVolume.SourceSnapshotId = StringUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("PreservedExistingData", targetDepth))
                    {
                        storediSCSIVolume.PreservedExistingData = BoolUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("VolumeiSCSIAttributes", targetDepth))
                    {
                        storediSCSIVolume.VolumeiSCSIAttributes = VolumeiSCSIAttributesUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(storediSCSIVolume);
                }
            }


            return(storediSCSIVolume);
        }
        public CachediSCSIVolume Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            CachediSCSIVolume cachediSCSIVolume = new CachediSCSIVolume();


            int targetDepth = context.CurrentDepth;

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("VolumeARN", targetDepth))
                {
                    cachediSCSIVolume.VolumeARN = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeId", targetDepth))
                {
                    cachediSCSIVolume.VolumeId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeType", targetDepth))
                {
                    cachediSCSIVolume.VolumeType = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeStatus", targetDepth))
                {
                    cachediSCSIVolume.VolumeStatus = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeSizeInBytes", targetDepth))
                {
                    cachediSCSIVolume.VolumeSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeProgress", targetDepth))
                {
                    cachediSCSIVolume.VolumeProgress = DoubleUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("SourceSnapshotId", targetDepth))
                {
                    cachediSCSIVolume.SourceSnapshotId = StringUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("VolumeiSCSIAttributes", targetDepth))
                {
                    cachediSCSIVolume.VolumeiSCSIAttributes = VolumeiSCSIAttributesUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(cachediSCSIVolume);
        }