/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("documentSource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DocumentSource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("job", targetDepth)) { var unmarshaller = JobUnmarshaller.Instance; response.Job = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("JobMetadata", targetDepth)) { var unmarshaller = JobMetadataUnmarshaller.Instance; response.JobMetadata = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SubJobMetadata", targetDepth)) { var unmarshaller = new ListUnmarshaller <JobMetadata, JobMetadataUnmarshaller>(JobMetadataUnmarshaller.Instance); response.SubJobMetadata = unmarshaller.Unmarshall(context); continue; } } return(response); }
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeJobResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Job", targetDepth)) { var unmarshaller = JobDescriptorUnmarshaller.Instance; response.Job = unmarshaller.Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); UnmarshallResult(context, response); return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(XmlUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.AllowEmptyElementLookup.Add("S3DeleteObjectTagging"); UnmarshallResult(context, response); return(response); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); response.DescribeJobResult = DescribeJobResultUnmarshaller.GetInstance().Unmarshall(context); return(response); }
public GlacierArchiveInfo ArchiveInfo(string jobId) { DescribeJobRequest describeJobRequest = new DescribeJobRequest() { AccountId = "-", JobId = jobId, VaultName = _vault }; DescribeJobResponse response = _amazonGlacierClient.DescribeJob(describeJobRequest); return(new GlacierArchiveInfo(response.DescribeJobResult)); }
public bool JobCompleted(string jobId) { DescribeJobRequest describeJobRequest = new DescribeJobRequest() { AccountId = "-", JobId = jobId, VaultName = _vault }; DescribeJobResponse response = _amazonGlacierClient.DescribeJob(describeJobRequest); return(response.DescribeJobResult.Completed); }
public static DescribeJobResponse Unmarshall(UnmarshallerContext context) { DescribeJobResponse describeJobResponse = new DescribeJobResponse(); describeJobResponse.HttpResponse = context.HttpResponse; describeJobResponse.RequestId = context.StringValue("DescribeJob.RequestId"); DescribeJobResponse.DescribeJob_Message message = new DescribeJobResponse.DescribeJob_Message(); message.JobInfo = context.StringValue("DescribeJob.Message.JobInfo"); describeJobResponse.Message = message; return(describeJobResponse); }
private static bool IsInventoryReady(string jobId, string vaultName) { using (IAmazonGlacier client = new AmazonGlacierClient(RegionEndpoint.EUWest1)) { DescribeJobRequest request = new DescribeJobRequest() { JobId = jobId, VaultName = vaultName }; DescribeJobResponse response = client.DescribeJob(request); return(response.Completed); } }
public static DescribeJobResponse Unmarshall(UnmarshallerContext context) { DescribeJobResponse describeJobResponse = new DescribeJobResponse(); describeJobResponse.HttpResponse = context.HttpResponse; describeJobResponse.RequestId = context.StringValue("DescribeJob.RequestId"); describeJobResponse.Id = context.StringValue("DescribeJob.Id"); describeJobResponse.Name = context.StringValue("DescribeJob.Name"); describeJobResponse.FailAct = context.StringValue("DescribeJob.FailAct"); describeJobResponse.Type = context.StringValue("DescribeJob.Type"); describeJobResponse.MaxRetry = context.IntegerValue("DescribeJob.MaxRetry"); describeJobResponse.RetryInterval = context.IntegerValue("DescribeJob.RetryInterval"); describeJobResponse.RunParameter = context.StringValue("DescribeJob.RunParameter"); return(describeJobResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Action", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Action = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ArchiveId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ArchiveId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ArchiveSHA256TreeHash", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ArchiveSHA256TreeHash = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ArchiveSizeInBytes", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.ArchiveSizeInBytes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Completed", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.Completed = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CompletionDate", targetDepth)) { var unmarshaller = Amazon.Runtime.Internal.Transform.DateTimeUnmarshaller.Instance; response.CompletionDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { var unmarshaller = Amazon.Runtime.Internal.Transform.DateTimeUnmarshaller.Instance; response.CreationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InventoryRetrievalParameters", targetDepth)) { var unmarshaller = InventoryRetrievalJobDescriptionUnmarshaller.Instance; response.InventoryRetrievalParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("InventorySizeInBytes", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.InventorySizeInBytes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobDescription", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobDescription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobOutputPath", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.JobOutputPath = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OutputLocation", targetDepth)) { var unmarshaller = OutputLocationUnmarshaller.Instance; response.OutputLocation = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RetrievalByteRange", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RetrievalByteRange = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SelectParameters", targetDepth)) { var unmarshaller = SelectParametersUnmarshaller.Instance; response.SelectParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SHA256TreeHash", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SHA256TreeHash = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SNSTopic", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SNSTopic = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StatusCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.StatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Tier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VaultARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VaultARN = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreateDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreateDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedBy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CreatedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DatasetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DatasetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EncryptionKeyArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EncryptionKeyArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EncryptionMode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.EncryptionMode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobSample", targetDepth)) { var unmarshaller = JobSampleUnmarshaller.Instance; response.JobSample = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedBy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LastModifiedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastModifiedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LogSubscription", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LogSubscription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxCapacity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.MaxCapacity = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxRetries", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.MaxRetries = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Outputs", targetDepth)) { var unmarshaller = new ListUnmarshaller <Output, OutputUnmarshaller>(OutputUnmarshaller.Instance); response.Outputs = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProjectName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProjectName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RecipeReference", targetDepth)) { var unmarshaller = RecipeReferenceUnmarshaller.Instance; response.RecipeReference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ResourceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RoleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RoleArn = 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("Timeout", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.Timeout = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } } return(response); }
public static DescribeJobResponse Unmarshall(UnmarshallerContext _ctx) { DescribeJobResponse describeJobResponse = new DescribeJobResponse(); describeJobResponse.HttpResponse = _ctx.HttpResponse; describeJobResponse.Code = _ctx.StringValue("DescribeJob.Code"); describeJobResponse.HttpStatusCode = _ctx.IntegerValue("DescribeJob.HttpStatusCode"); describeJobResponse.Message = _ctx.StringValue("DescribeJob.Message"); describeJobResponse.RequestId = _ctx.StringValue("DescribeJob.RequestId"); describeJobResponse.Success = _ctx.BooleanValue("DescribeJob.Success"); DescribeJobResponse.DescribeJob_Job job = new DescribeJobResponse.DescribeJob_Job(); job.FailureReason = _ctx.StringValue("DescribeJob.Job.FailureReason"); job.JobGroupId = _ctx.StringValue("DescribeJob.Job.JobGroupId"); job.JobId = _ctx.StringValue("DescribeJob.Job.JobId"); job.Priority = _ctx.IntegerValue("DescribeJob.Job.Priority"); job.ReferenceId = _ctx.StringValue("DescribeJob.Job.ReferenceId"); job.ScenarioId = _ctx.StringValue("DescribeJob.Job.ScenarioId"); job.Status = _ctx.StringValue("DescribeJob.Job.Status"); job.StrategyId = _ctx.StringValue("DescribeJob.Job.StrategyId"); job.SystemPriority = _ctx.IntegerValue("DescribeJob.Job.SystemPriority"); List <string> job_callingNumbers = new List <string>(); for (int i = 0; i < _ctx.Length("DescribeJob.Job.CallingNumbers.Length"); i++) { job_callingNumbers.Add(_ctx.StringValue("DescribeJob.Job.CallingNumbers[" + i + "]")); } job.CallingNumbers = job_callingNumbers; List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Contact> job_contacts = new List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Contact>(); for (int i = 0; i < _ctx.Length("DescribeJob.Job.Contacts.Length"); i++) { DescribeJobResponse.DescribeJob_Job.DescribeJob_Contact contact = new DescribeJobResponse.DescribeJob_Job.DescribeJob_Contact(); contact.ContactId = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].ContactId"); contact.ContactName = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].ContactName"); contact.Honorific = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].Honorific"); contact.JobId = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].JobId"); contact.PhoneNumber = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].PhoneNumber"); contact.ReferenceId = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].ReferenceId"); contact.Role = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].Role"); contact.State = _ctx.StringValue("DescribeJob.Job.Contacts[" + i + "].State"); job_contacts.Add(contact); } job.Contacts = job_contacts; List <DescribeJobResponse.DescribeJob_Job.DescribeJob_KeyValuePair> job_extras = new List <DescribeJobResponse.DescribeJob_Job.DescribeJob_KeyValuePair>(); for (int i = 0; i < _ctx.Length("DescribeJob.Job.Extras.Length"); i++) { DescribeJobResponse.DescribeJob_Job.DescribeJob_KeyValuePair keyValuePair = new DescribeJobResponse.DescribeJob_Job.DescribeJob_KeyValuePair(); keyValuePair.Key = _ctx.StringValue("DescribeJob.Job.Extras[" + i + "].Key"); keyValuePair._Value = _ctx.StringValue("DescribeJob.Job.Extras[" + i + "].Value"); job_extras.Add(keyValuePair); } job.Extras = job_extras; List <DescribeJobResponse.DescribeJob_Job.DescribeJob_SummaryItem> job_summary = new List <DescribeJobResponse.DescribeJob_Job.DescribeJob_SummaryItem>(); for (int i = 0; i < _ctx.Length("DescribeJob.Job.Summary.Length"); i++) { DescribeJobResponse.DescribeJob_Job.DescribeJob_SummaryItem summaryItem = new DescribeJobResponse.DescribeJob_Job.DescribeJob_SummaryItem(); summaryItem.Category = _ctx.StringValue("DescribeJob.Job.Summary[" + i + "].Category"); summaryItem.Content = _ctx.StringValue("DescribeJob.Job.Summary[" + i + "].Content"); summaryItem.SummaryName = _ctx.StringValue("DescribeJob.Job.Summary[" + i + "].SummaryName"); job_summary.Add(summaryItem); } job.Summary = job_summary; List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Task> job_tasks = new List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Task>(); for (int i = 0; i < _ctx.Length("DescribeJob.Job.Tasks.Length"); i++) { DescribeJobResponse.DescribeJob_Job.DescribeJob_Task task = new DescribeJobResponse.DescribeJob_Job.DescribeJob_Task(); task.ActualTime = _ctx.LongValue("DescribeJob.Job.Tasks[" + i + "].ActualTime"); task.Brief = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Brief"); task.CallId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].CallId"); task.CalledNumber = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].CalledNumber"); task.CallingNumber = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].CallingNumber"); task.ChatbotId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].ChatbotId"); task.Duration = _ctx.IntegerValue("DescribeJob.Job.Tasks[" + i + "].Duration"); task.JobId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].JobId"); task.PlanedTime = _ctx.LongValue("DescribeJob.Job.Tasks[" + i + "].PlanedTime"); task.ScenarioId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].ScenarioId"); task.Status = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Status"); task.TaskId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].TaskId"); DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_Contact3 contact3 = new DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_Contact3(); contact3.ContactId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.ContactId"); contact3.ContactName = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.ContactName"); contact3.Honorific = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.Honorific"); contact3.JobId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.JobId"); contact3.PhoneNumber = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.PhoneNumber"); contact3.ReferenceId = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.ReferenceId"); contact3.Role = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.Role"); contact3.State = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Contact.State"); task.Contact3 = contact3; List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail> task_conversation = new List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail>(); for (int j = 0; j < _ctx.Length("DescribeJob.Job.Tasks[" + i + "].Conversation.Length"); j++) { DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail conversationDetail = new DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail(); conversationDetail.Script = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Script"); conversationDetail.Speaker = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Speaker"); conversationDetail.Timestamp = _ctx.LongValue("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Timestamp"); List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail.DescribeJob_SummaryItem2> conversationDetail_summary1 = new List <DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail.DescribeJob_SummaryItem2>(); for (int k = 0; k < _ctx.Length("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Summary.Length"); k++) { DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail.DescribeJob_SummaryItem2 summaryItem2 = new DescribeJobResponse.DescribeJob_Job.DescribeJob_Task.DescribeJob_ConversationDetail.DescribeJob_SummaryItem2(); summaryItem2.Category = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Summary[" + k + "].Category"); summaryItem2.Content = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Summary[" + k + "].Content"); summaryItem2.SummaryName = _ctx.StringValue("DescribeJob.Job.Tasks[" + i + "].Conversation[" + j + "].Summary[" + k + "].SummaryName"); conversationDetail_summary1.Add(summaryItem2); } conversationDetail.Summary1 = conversationDetail_summary1; task_conversation.Add(conversationDetail); } task.Conversation = task_conversation; job_tasks.Add(task); } job.Tasks = job_tasks; describeJobResponse.Job = job; return(describeJobResponse); }
public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeJobResponse response = new DescribeJobResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("JobId", targetDepth)) { response.JobId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("JobDescription", targetDepth)) { response.JobDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Action", targetDepth)) { response.Action = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveId", targetDepth)) { response.ArchiveId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VaultARN", targetDepth)) { response.VaultARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { response.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Completed", targetDepth)) { response.Completed = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { response.StatusCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { response.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSizeInBytes", targetDepth)) { response.ArchiveSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventorySizeInBytes", targetDepth)) { response.InventorySizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SNSTopic", targetDepth)) { response.SNSTopic = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CompletionDate", targetDepth)) { response.CompletionDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SHA256TreeHash", targetDepth)) { response.SHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSHA256TreeHash", targetDepth)) { response.ArchiveSHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RetrievalByteRange", targetDepth)) { response.RetrievalByteRange = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventoryRetrievalParameters", targetDepth)) { response.InventoryRetrievalParameters = InventoryRetrievalJobDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(response); }
private static void UnmarshallResult(JsonUnmarshallerContext context, DescribeJobResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("JobId", targetDepth)) { context.Read(); response.JobId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("JobDescription", targetDepth)) { context.Read(); response.JobDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Action", targetDepth)) { context.Read(); response.Action = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveId", targetDepth)) { context.Read(); response.ArchiveId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VaultARN", targetDepth)) { context.Read(); response.VaultARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { context.Read(); response.CreationDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Completed", targetDepth)) { context.Read(); response.Completed = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusCode", targetDepth)) { context.Read(); response.StatusCode = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusMessage", targetDepth)) { context.Read(); response.StatusMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSizeInBytes", targetDepth)) { context.Read(); response.ArchiveSizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventorySizeInBytes", targetDepth)) { context.Read(); response.InventorySizeInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SNSTopic", targetDepth)) { context.Read(); response.SNSTopic = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CompletionDate", targetDepth)) { context.Read(); response.CompletionDate = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SHA256TreeHash", targetDepth)) { context.Read(); response.SHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ArchiveSHA256TreeHash", targetDepth)) { context.Read(); response.ArchiveSHA256TreeHash = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RetrievalByteRange", targetDepth)) { context.Read(); response.RetrievalByteRange = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InventoryRetrievalParameters", targetDepth)) { context.Read(); response.InventoryRetrievalParameters = InventoryRetrievalJobDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return; } } return; }