Пример #1
0
        public static RestoreBackupResponse Unmarshall(UnmarshallerContext _ctx)
        {
            RestoreBackupResponse restoreBackupResponse = new RestoreBackupResponse();

            restoreBackupResponse.HttpResponse     = _ctx.HttpResponse;
            restoreBackupResponse.RequestId        = _ctx.StringValue("RestoreBackup.RequestId");
            restoreBackupResponse.BizId            = _ctx.StringValue("RestoreBackup.BizId");
            restoreBackupResponse.DataSourceId     = _ctx.LongValue("RestoreBackup.DataSourceId");
            restoreBackupResponse.TaskType         = _ctx.StringValue("RestoreBackup.TaskType");
            restoreBackupResponse.TaskStatus       = _ctx.StringValue("RestoreBackup.TaskStatus");
            restoreBackupResponse.StartTime        = _ctx.LongValue("RestoreBackup.StartTime");
            restoreBackupResponse.EndTime          = _ctx.LongValue("RestoreBackup.EndTime");
            restoreBackupResponse.TaskDetail       = _ctx.StringValue("RestoreBackup.TaskDetail");
            restoreBackupResponse.TaskResultDetail = _ctx.StringValue("RestoreBackup.TaskResultDetail");
            restoreBackupResponse.TaskProcess      = _ctx.IntegerValue("RestoreBackup.TaskProcess");
            restoreBackupResponse.TriggerUser      = _ctx.StringValue("RestoreBackup.TriggerUser");
            restoreBackupResponse.TriggerType      = _ctx.StringValue("RestoreBackup.TriggerType");
            restoreBackupResponse.GmtCreate        = _ctx.LongValue("RestoreBackup.GmtCreate");
            restoreBackupResponse.GmtModified      = _ctx.LongValue("RestoreBackup.GmtModified");
            restoreBackupResponse.ClusterBizId     = _ctx.StringValue("RestoreBackup.ClusterBizId");
            restoreBackupResponse.HostName         = _ctx.StringValue("RestoreBackup.HostName");
            restoreBackupResponse.EcmTaskId        = _ctx.LongValue("RestoreBackup.EcmTaskId");

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

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

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

            return(response);
        }