Ejemplo n.º 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)
        {
            DescribeFlowResponse response = new DescribeFlowResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("flow", targetDepth))
                {
                    var unmarshaller = FlowUnmarshaller.Instance;
                    response.Flow = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("messages", targetDepth))
                {
                    var unmarshaller = MessagesUnmarshaller.Instance;
                    response.Messages = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }
Ejemplo n.º 2
0
        public static DescribeFlowResponse Unmarshall(UnmarshallerContext _ctx)
        {
            DescribeFlowResponse describeFlowResponse = new DescribeFlowResponse();

            describeFlowResponse.HttpResponse            = _ctx.HttpResponse;
            describeFlowResponse.RequestId               = _ctx.StringValue("DescribeFlow.RequestId");
            describeFlowResponse.Id                      = _ctx.StringValue("DescribeFlow.Id");
            describeFlowResponse.GmtCreate               = _ctx.LongValue("DescribeFlow.GmtCreate");
            describeFlowResponse.GmtModified             = _ctx.LongValue("DescribeFlow.GmtModified");
            describeFlowResponse.Name                    = _ctx.StringValue("DescribeFlow.Name");
            describeFlowResponse.Description             = _ctx.StringValue("DescribeFlow.Description");
            describeFlowResponse.Type                    = _ctx.StringValue("DescribeFlow.Type");
            describeFlowResponse.Status                  = _ctx.StringValue("DescribeFlow.Status");
            describeFlowResponse.Periodic                = _ctx.BooleanValue("DescribeFlow.Periodic");
            describeFlowResponse.StartSchedule           = _ctx.LongValue("DescribeFlow.StartSchedule");
            describeFlowResponse.EndSchedule             = _ctx.LongValue("DescribeFlow.EndSchedule");
            describeFlowResponse.CronExpr                = _ctx.StringValue("DescribeFlow.CronExpr");
            describeFlowResponse.CreateCluster           = _ctx.BooleanValue("DescribeFlow.CreateCluster");
            describeFlowResponse.ClusterId               = _ctx.StringValue("DescribeFlow.ClusterId");
            describeFlowResponse.HostName                = _ctx.StringValue("DescribeFlow.HostName");
            describeFlowResponse._Namespace              = _ctx.StringValue("DescribeFlow.Namespace");
            describeFlowResponse.LogArchiveLocation      = _ctx.StringValue("DescribeFlow.LogArchiveLocation");
            describeFlowResponse.Lifecycle               = _ctx.StringValue("DescribeFlow.Lifecycle");
            describeFlowResponse.Graph                   = _ctx.StringValue("DescribeFlow.Graph");
            describeFlowResponse.CategoryId              = _ctx.StringValue("DescribeFlow.CategoryId");
            describeFlowResponse.AlertConf               = _ctx.StringValue("DescribeFlow.AlertConf");
            describeFlowResponse.AlertUserGroupBizId     = _ctx.StringValue("DescribeFlow.AlertUserGroupBizId");
            describeFlowResponse.AlertDingDingGroupBizId = _ctx.StringValue("DescribeFlow.AlertDingDingGroupBizId");
            describeFlowResponse.Application             = _ctx.StringValue("DescribeFlow.Application");
            describeFlowResponse.EditLockDetail          = _ctx.StringValue("DescribeFlow.EditLockDetail");

            List <DescribeFlowResponse.DescribeFlow_ParentFlow> describeFlowResponse_parentFlowList = new List <DescribeFlowResponse.DescribeFlow_ParentFlow>();

            for (int i = 0; i < _ctx.Length("DescribeFlow.ParentFlowList.Length"); i++)
            {
                DescribeFlowResponse.DescribeFlow_ParentFlow parentFlow = new DescribeFlowResponse.DescribeFlow_ParentFlow();
                parentFlow.ParentFlowId   = _ctx.StringValue("DescribeFlow.ParentFlowList[" + i + "].ParentFlowId");
                parentFlow.ParentFlowName = _ctx.StringValue("DescribeFlow.ParentFlowList[" + i + "].ParentFlowName");
                parentFlow.ProjectId      = _ctx.StringValue("DescribeFlow.ParentFlowList[" + i + "].ProjectId");
                parentFlow.ProjectName    = _ctx.StringValue("DescribeFlow.ParentFlowList[" + i + "].ProjectName");

                describeFlowResponse_parentFlowList.Add(parentFlow);
            }
            describeFlowResponse.ParentFlowList = describeFlowResponse_parentFlowList;

            return(describeFlowResponse);
        }
        public static DescribeFlowResponse Unmarshall(UnmarshallerContext context)
        {
            DescribeFlowResponse describeFlowResponse = new DescribeFlowResponse();

            describeFlowResponse.HttpResponse     = context.HttpResponse;
            describeFlowResponse.RequestId        = context.StringValue("DescribeFlow.RequestId");
            describeFlowResponse.Name             = context.StringValue("DescribeFlow.Name");
            describeFlowResponse.Description      = context.StringValue("DescribeFlow.Description");
            describeFlowResponse.Definition       = context.StringValue("DescribeFlow.Definition");
            describeFlowResponse.Id               = context.StringValue("DescribeFlow.Id");
            describeFlowResponse.Type             = context.StringValue("DescribeFlow.Type");
            describeFlowResponse.RoleArn          = context.StringValue("DescribeFlow.RoleArn");
            describeFlowResponse.CreatedTime      = context.StringValue("DescribeFlow.CreatedTime");
            describeFlowResponse.LastModifiedTime = context.StringValue("DescribeFlow.LastModifiedTime");

            return(describeFlowResponse);
        }
Ejemplo n.º 4
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)
        {
            DescribeFlowResponse response = new DescribeFlowResponse();

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

            while (context.ReadAtDepth(targetDepth))
            {
                if (context.TestExpression("createdAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.CreatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("createdBy", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.CreatedBy = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("description", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.Description = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("destinationFlowConfigList", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <DestinationFlowConfig, DestinationFlowConfigUnmarshaller>(DestinationFlowConfigUnmarshaller.Instance);
                    response.DestinationFlowConfigList = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("flowArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FlowArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("flowName", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FlowName = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("flowStatus", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FlowStatus = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("flowStatusMessage", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.FlowStatusMessage = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("kmsArn", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.KmsArn = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lastRunExecutionDetails", targetDepth))
                {
                    var unmarshaller = ExecutionDetailsUnmarshaller.Instance;
                    response.LastRunExecutionDetails = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lastUpdatedAt", targetDepth))
                {
                    var unmarshaller = DateTimeUnmarshaller.Instance;
                    response.LastUpdatedAt = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("lastUpdatedBy", targetDepth))
                {
                    var unmarshaller = StringUnmarshaller.Instance;
                    response.LastUpdatedBy = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("sourceFlowConfig", targetDepth))
                {
                    var unmarshaller = SourceFlowConfigUnmarshaller.Instance;
                    response.SourceFlowConfig = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("tags", targetDepth))
                {
                    var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
                    response.Tags = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("tasks", targetDepth))
                {
                    var unmarshaller = new ListUnmarshaller <Task, TaskUnmarshaller>(TaskUnmarshaller.Instance);
                    response.Tasks = unmarshaller.Unmarshall(context);
                    continue;
                }
                if (context.TestExpression("triggerConfig", targetDepth))
                {
                    var unmarshaller = TriggerConfigUnmarshaller.Instance;
                    response.TriggerConfig = unmarshaller.Unmarshall(context);
                    continue;
                }
            }

            return(response);
        }