public static PipelineOutputConfigUnmarshaller GetInstance()
 {
     if (instance == null)
     {
         instance = new PipelineOutputConfigUnmarshaller();
     }
     return(instance);
 }
        public Pipeline Unmarshall(JsonUnmarshallerContext context)
        {
            context.Read();
            if (context.CurrentTokenType == JsonToken.Null)
            {
                return(null);
            }
            Pipeline pipeline = new Pipeline();


            int targetDepth = context.CurrentDepth;

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

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

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

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

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

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

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

                if (context.TestExpression("Notifications", targetDepth))
                {
                    pipeline.Notifications = NotificationsUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("ContentConfig", targetDepth))
                {
                    pipeline.ContentConfig = PipelineOutputConfigUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }

                if (context.TestExpression("ThumbnailConfig", targetDepth))
                {
                    pipeline.ThumbnailConfig = PipelineOutputConfigUnmarshaller.GetInstance().Unmarshall(context);
                    continue;
                }
            }

            return(pipeline);
        }
        public Pipeline Unmarshall(JsonUnmarshallerContext context)
        {
            Pipeline pipeline = new Pipeline();

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

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

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

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

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

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

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

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

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

                    if (context.TestExpression("Notifications", targetDepth))
                    {
                        pipeline.Notifications = NotificationsUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ContentConfig", targetDepth))
                    {
                        pipeline.ContentConfig = PipelineOutputConfigUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }

                    if (context.TestExpression("ThumbnailConfig", targetDepth))
                    {
                        pipeline.ThumbnailConfig = PipelineOutputConfigUnmarshaller.GetInstance().Unmarshall(context);
                        continue;
                    }
                }
                else if (context.IsEndElement && context.CurrentDepth <= originalDepth)
                {
                    return(pipeline);
                }
            }


            return(pipeline);
        }