/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ECSTaskSet Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } ECSTaskSet unmarshalledObject = new ECSTaskSet(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("desiredCount", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.DesiredCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("identifer", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Identifer = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("pendingCount", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.PendingCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("runningCount", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.RunningCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("targetGroup", targetDepth)) { var unmarshaller = TargetGroupInfoUnmarshaller.Instance; unmarshalledObject.TargetGroup = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("taskSetLabel", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TaskSetLabel = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("trafficWeight", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.TrafficWeight = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeProjectResponse response = new DescribeProjectResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreatedBy", targetDepth)) { var unmarshaller = UserContextUnmarshaller.Instance; response.CreatedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProjectArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProjectArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProjectDescription", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProjectDescription = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProjectId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProjectId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProjectName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProjectName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProjectStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProjectStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServiceCatalogProvisionedProductDetails", targetDepth)) { var unmarshaller = ServiceCatalogProvisionedProductDetailsUnmarshaller.Instance; response.ServiceCatalogProvisionedProductDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServiceCatalogProvisioningDetails", targetDepth)) { var unmarshaller = ServiceCatalogProvisioningDetailsUnmarshaller.Instance; response.ServiceCatalogProvisioningDetails = 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 JobMetadata Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } JobMetadata unmarshalledObject = new JobMetadata(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AddressId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AddressId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ClusterId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ClusterId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DataTransferProgress", targetDepth)) { var unmarshaller = DataTransferUnmarshaller.Instance; unmarshalledObject.DataTransferProgress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceConfiguration", targetDepth)) { var unmarshaller = DeviceConfigurationUnmarshaller.Instance; unmarshalledObject.DeviceConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ForwardingAddressId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ForwardingAddressId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobLogInfo", targetDepth)) { var unmarshaller = JobLogsUnmarshaller.Instance; unmarshalledObject.JobLogInfo = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobState = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("JobType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsKeyARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Notification", targetDepth)) { var unmarshaller = NotificationUnmarshaller.Instance; unmarshalledObject.Notification = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Resources", targetDepth)) { var unmarshaller = JobResourceUnmarshaller.Instance; unmarshalledObject.Resources = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RoleARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RoleARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ShippingDetails", targetDepth)) { var unmarshaller = ShippingDetailsUnmarshaller.Instance; unmarshalledObject.ShippingDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SnowballCapacityPreference", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SnowballCapacityPreference = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SnowballType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SnowballType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TaxDocuments", targetDepth)) { var unmarshaller = TaxDocumentsUnmarshaller.Instance; unmarshalledObject.TaxDocuments = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
public Interconnect Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonUnmarshallerContext.TokenType.Null) { return(null); } Interconnect interconnect = new Interconnect(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("InterconnectId", targetDepth)) { interconnect.InterconnectId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InterconnectName", targetDepth)) { interconnect.InterconnectName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InterconnectState", targetDepth)) { interconnect.InterconnectState = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Region", targetDepth)) { interconnect.Region = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Location", targetDepth)) { interconnect.Location = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Bandwidth", targetDepth)) { interconnect.Bandwidth = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(interconnect); } } return(interconnect); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public GeneralName Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } GeneralName unmarshalledObject = new GeneralName(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("DirectoryName", targetDepth)) { var unmarshaller = ASN1SubjectUnmarshaller.Instance; unmarshalledObject.DirectoryName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DnsName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DnsName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EdiPartyName", targetDepth)) { var unmarshaller = EdiPartyNameUnmarshaller.Instance; unmarshalledObject.EdiPartyName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IpAddress", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.IpAddress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OtherName", targetDepth)) { var unmarshaller = OtherNameUnmarshaller.Instance; unmarshalledObject.OtherName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RegisteredId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RegisteredId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Rfc822Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Rfc822Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UniformResourceIdentifier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.UniformResourceIdentifier = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ApprovalRule Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } ApprovalRule unmarshalledObject = new ApprovalRule(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("approvalRuleContent", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApprovalRuleContent = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("approvalRuleId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApprovalRuleId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("approvalRuleName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ApprovalRuleName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("creationDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastModifiedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastModifiedUser", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LastModifiedUser = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("originApprovalRuleTemplate", targetDepth)) { var unmarshaller = OriginApprovalRuleTemplateUnmarshaller.Instance; unmarshalledObject.OriginApprovalRuleTemplate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ruleContentSha256", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RuleContentSha256 = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
public WorkflowExecutionContinuedAsNewEventAttributes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } WorkflowExecutionContinuedAsNewEventAttributes workflowExecutionContinuedAsNewEventAttributes = new WorkflowExecutionContinuedAsNewEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("input", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("newExecutionRunId", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.NewExecutionRunId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("executionStartToCloseTimeout", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.ExecutionStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskList", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskStartToCloseTimeout", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.TaskStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("childPolicy", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.ChildPolicy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagList", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.TagList = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } workflowExecutionContinuedAsNewEventAttributes.TagList.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("workflowType", targetDepth)) { context.Read(); workflowExecutionContinuedAsNewEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(workflowExecutionContinuedAsNewEventAttributes); } } return(workflowExecutionContinuedAsNewEventAttributes); }
public TableDescription Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } TableDescription tableDescription = new TableDescription(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("AttributeDefinitions", targetDepth)) { context.Read(); tableDescription.AttributeDefinitions = new List <AttributeDefinition>(); AttributeDefinitionUnmarshaller unmarshaller = AttributeDefinitionUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } tableDescription.AttributeDefinitions.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("TableName", targetDepth)) { context.Read(); tableDescription.TableName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeySchema", targetDepth)) { context.Read(); tableDescription.KeySchema = new List <KeySchemaElement>(); KeySchemaElementUnmarshaller unmarshaller = KeySchemaElementUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } tableDescription.KeySchema.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("TableStatus", targetDepth)) { context.Read(); tableDescription.TableStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDateTime", targetDepth)) { context.Read(); tableDescription.CreationDateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ProvisionedThroughput", targetDepth)) { context.Read(); tableDescription.ProvisionedThroughput = ProvisionedThroughputDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TableSizeBytes", targetDepth)) { context.Read(); tableDescription.TableSizeBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ItemCount", targetDepth)) { context.Read(); tableDescription.ItemCount = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LocalSecondaryIndexes", targetDepth)) { context.Read(); tableDescription.LocalSecondaryIndexes = new List <LocalSecondaryIndexDescription>(); LocalSecondaryIndexDescriptionUnmarshaller unmarshaller = LocalSecondaryIndexDescriptionUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } tableDescription.LocalSecondaryIndexes.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("GlobalSecondaryIndexes", targetDepth)) { context.Read(); tableDescription.GlobalSecondaryIndexes = new List <GlobalSecondaryIndexDescription>(); GlobalSecondaryIndexDescriptionUnmarshaller unmarshaller = GlobalSecondaryIndexDescriptionUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } tableDescription.GlobalSecondaryIndexes.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.CurrentDepth <= originalDepth) { return(tableDescription); } } return(tableDescription); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { AssociateVirtualInterfaceResponse response = new AssociateVirtualInterfaceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("addressFamily", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AddressFamily = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("amazonAddress", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AmazonAddress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("amazonSideAsn", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; response.AmazonSideAsn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("asn", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.Asn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("authKey", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AuthKey = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("bgpPeers", targetDepth)) { var unmarshaller = new ListUnmarshaller <BGPPeer, BGPPeerUnmarshaller>(BGPPeerUnmarshaller.Instance); response.BgpPeers = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("connectionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConnectionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("customerAddress", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CustomerAddress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("customerRouterConfig", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CustomerRouterConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("directConnectGatewayId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DirectConnectGatewayId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("location", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ownerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("routeFilterPrefixes", targetDepth)) { var unmarshaller = new ListUnmarshaller <RouteFilterPrefix, RouteFilterPrefixUnmarshaller>(RouteFilterPrefixUnmarshaller.Instance); response.RouteFilterPrefixes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualGatewayId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VirtualGatewayId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VirtualInterfaceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VirtualInterfaceName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VirtualInterfaceState = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("virtualInterfaceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.VirtualInterfaceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("vlan", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.Vlan = 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 Filter Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } Filter unmarshalledObject = new Filter(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("creationDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("datasetGroupArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DatasetGroupArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("failureReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FailureReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("filterArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FilterArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("filterExpression", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FilterExpression = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdatedDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public TerminologyProperties Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } TerminologyProperties unmarshalledObject = new TerminologyProperties(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Directionality", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Directionality = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EncryptionKey", targetDepth)) { var unmarshaller = EncryptionKeyUnmarshaller.Instance; unmarshalledObject.EncryptionKey = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Format", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Format = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Message", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Message = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SizeBytes", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.SizeBytes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SkippedTermCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.SkippedTermCount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SourceLanguageCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SourceLanguageCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetLanguageCodes", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.TargetLanguageCodes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TermCount", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.TermCount = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDomainConfigurationResponse response = new DescribeDomainConfigurationResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("authorizerConfig", targetDepth)) { var unmarshaller = AuthorizerConfigUnmarshaller.Instance; response.AuthorizerConfig = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainConfigurationArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainConfigurationArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainConfigurationName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainConfigurationName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainConfigurationStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainConfigurationStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastStatusChangeDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastStatusChangeDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serverCertificates", targetDepth)) { var unmarshaller = new ListUnmarshaller <ServerCertificateSummary, ServerCertificateSummaryUnmarshaller>(ServerCertificateSummaryUnmarshaller.Instance); response.ServerCertificates = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("serviceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ServiceType = 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 ServiceQuotaIncreaseRequestInTemplate Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } ServiceQuotaIncreaseRequestInTemplate unmarshalledObject = new ServiceQuotaIncreaseRequestInTemplate(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AwsRegion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AwsRegion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DesiredValue", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.DesiredValue = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GlobalQuota", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.GlobalQuota = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("QuotaCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.QuotaCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("QuotaName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.QuotaName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServiceCode", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServiceCode = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ServiceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ServiceName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Unit", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Unit = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DetectorModelVersionSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } DetectorModelVersionSummary unmarshalledObject = new DetectorModelVersionSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("creationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("detectorModelArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DetectorModelArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("detectorModelName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DetectorModelName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("detectorModelVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DetectorModelVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("evaluationMethod", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.EvaluationMethod = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastUpdateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("roleArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.RoleArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public SipRule Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } SipRule unmarshalledObject = new SipRule(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreatedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedTimestamp = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Disabled", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.Disabled = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SipRuleId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SipRuleId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetApplications", targetDepth)) { var unmarshaller = new ListUnmarshaller <SipRuleTargetApplication, SipRuleTargetApplicationUnmarshaller>(SipRuleTargetApplicationUnmarshaller.Instance); unmarshalledObject.TargetApplications = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TriggerType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TriggerType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TriggerValue", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TriggerValue = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("UpdatedTimestamp", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.UpdatedTimestamp = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public StorediSCSIVolume Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } StorediSCSIVolume unmarshalledObject = new StorediSCSIVolume(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreatedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KMSKey", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KMSKey = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PreservedExistingData", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.PreservedExistingData = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SourceSnapshotId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.SourceSnapshotId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TargetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TargetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VolumeARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeAttachmentStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VolumeAttachmentStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeDiskId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VolumeDiskId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VolumeId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeiSCSIAttributes", targetDepth)) { var unmarshaller = VolumeiSCSIAttributesUnmarshaller.Instance; unmarshalledObject.VolumeiSCSIAttributes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeProgress", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.VolumeProgress = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeSizeInBytes", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.VolumeSizeInBytes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VolumeStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VolumeType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VolumeUsedInBytes", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.VolumeUsedInBytes = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { PutRestApiResponse response = new PutRestApiResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("apiKeySource", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ApiKeySource = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("binaryMediaTypes", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.BinaryMediaTypes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("endpointConfiguration", targetDepth)) { var unmarshaller = EndpointConfigurationUnmarshaller.Instance; response.EndpointConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("minimumCompressionSize", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.MinimumCompressionSize = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("policy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Policy = 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("version", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Version = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("warnings", targetDepth)) { var unmarshaller = new ListUnmarshaller <string, StringUnmarshaller>(StringUnmarshaller.Instance); response.Warnings = 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 FileSystem Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) return null; FileSystem unmarshalledObject = new FileSystem(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AdministrativeActions", targetDepth)) { var unmarshaller = new ListUnmarshaller<AdministrativeAction, AdministrativeActionUnmarshaller>(AdministrativeActionUnmarshaller.Instance); unmarshalledObject.AdministrativeActions = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DNSName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DNSName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FailureDetails", targetDepth)) { var unmarshaller = FileSystemFailureDetailsUnmarshaller.Instance; unmarshalledObject.FailureDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FileSystemId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FileSystemId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FileSystemType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FileSystemType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KmsKeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KmsKeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Lifecycle", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Lifecycle = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LustreConfiguration", targetDepth)) { var unmarshaller = LustreFileSystemConfigurationUnmarshaller.Instance; unmarshalledObject.LustreConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkInterfaceIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.NetworkInterfaceIds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OwnerId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.OwnerId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ResourceARN", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ResourceARN = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StorageCapacity", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.StorageCapacity = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StorageType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StorageType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SubnetIds", targetDepth)) { var unmarshaller = new ListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance); unmarshalledObject.SubnetIds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tags", targetDepth)) { var unmarshaller = new ListUnmarshaller<Tag, TagUnmarshaller>(TagUnmarshaller.Instance); unmarshalledObject.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.VpcId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("WindowsConfiguration", targetDepth)) { var unmarshaller = WindowsFileSystemConfigurationUnmarshaller.Instance; unmarshalledObject.WindowsConfiguration = unmarshaller.Unmarshall(context); continue; } } return unmarshalledObject; }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public ParameterMetadata Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } ParameterMetadata unmarshalledObject = new ParameterMetadata(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AllowedPattern", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AllowedPattern = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DataType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.DataType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("KeyId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.KeyId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedUser", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.LastModifiedUser = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Policies", targetDepth)) { var unmarshaller = new ListUnmarshaller <ParameterInlinePolicy, ParameterInlinePolicyUnmarshaller>(ParameterInlinePolicyUnmarshaller.Instance); unmarshalledObject.Policies = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Tier", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Tier = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Version", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.Version = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DisassociateConnectionFromLagResponse response = new DisassociateConnectionFromLagResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("awsDevice", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AwsDevice = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("awsDeviceV2", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AwsDeviceV2 = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("bandwidth", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Bandwidth = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("connectionId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConnectionId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("connectionName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConnectionName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("connectionState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ConnectionState = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("hasLogicalRedundancy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.HasLogicalRedundancy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jumboFrameCapable", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; response.JumboFrameCapable = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lagId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LagId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("loaIssueTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LoaIssueTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("location", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Location = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ownerAccount", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnerAccount = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("partnerName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PartnerName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("region", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Region = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("tags", targetDepth)) { var unmarshaller = new ListUnmarshaller <Tag, TagUnmarshaller>(TagUnmarshaller.Instance); response.Tags = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("vlan", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.Vlan = 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 CrawlerMetrics Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } CrawlerMetrics unmarshalledObject = new CrawlerMetrics(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CrawlerName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CrawlerName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastRuntimeSeconds", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.LastRuntimeSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MedianRuntimeSeconds", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.MedianRuntimeSeconds = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StillEstimating", targetDepth)) { var unmarshaller = BoolUnmarshaller.Instance; unmarshalledObject.StillEstimating = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TablesCreated", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.TablesCreated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TablesDeleted", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.TablesDeleted = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TablesUpdated", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.TablesUpdated = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TimeLeftSeconds", targetDepth)) { var unmarshaller = DoubleUnmarshaller.Instance; unmarshalledObject.TimeLeftSeconds = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { GetDomainNameResponse response = new GetDomainNameResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("certificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("certificateName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CertificateName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("certificateUploadDate", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CertificateUploadDate = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("distributionDomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DistributionDomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("distributionHostedZoneId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DistributionHostedZoneId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainNameStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainNameStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainNameStatusMessage", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DomainNameStatusMessage = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("endpointConfiguration", targetDepth)) { var unmarshaller = EndpointConfigurationUnmarshaller.Instance; response.EndpointConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("mutualTlsAuthentication", targetDepth)) { var unmarshaller = MutualTlsAuthenticationUnmarshaller.Instance; response.MutualTlsAuthentication = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("domainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ownershipVerificationCertificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OwnershipVerificationCertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalCertificateArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalCertificateArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalCertificateName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalCertificateName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalDomainName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalDomainName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("regionalHostedZoneId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.RegionalHostedZoneId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("securityPolicy", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SecurityPolicy = 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; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public Certificate Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } Certificate unmarshalledObject = new Certificate(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CertificateId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CertificateId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ClientCertAuthSettings", targetDepth)) { var unmarshaller = ClientCertAuthSettingsUnmarshaller.Instance; unmarshalledObject.ClientCertAuthSettings = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CommonName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.CommonName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExpiryDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.ExpiryDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RegisteredDateTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.RegisteredDateTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StateReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StateReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Type = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
public TableDescription Unmarshall(JsonUnmarshallerContext context) { TableDescription tableDescription = new TableDescription(); tableDescription.AttributeDefinitions = null; tableDescription.KeySchema = null; tableDescription.LocalSecondaryIndexes = null; int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if ((context.IsKey) && (context.CurrentDepth == targetDepth)) { context.Read(); context.Read(); if (context.TestExpression("AttributeDefinitions", targetDepth)) { tableDescription.AttributeDefinitions = new List <AttributeDefinition>(); AttributeDefinitionUnmarshaller unmarshaller = AttributeDefinitionUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { tableDescription.AttributeDefinitions.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("TableName", targetDepth)) { tableDescription.TableName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeySchema", targetDepth)) { tableDescription.KeySchema = new List <KeySchemaElement>(); KeySchemaElementUnmarshaller unmarshaller = KeySchemaElementUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { tableDescription.KeySchema.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("TableStatus", targetDepth)) { tableDescription.TableStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreationDateTime", targetDepth)) { tableDescription.CreationDateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ProvisionedThroughput", targetDepth)) { tableDescription.ProvisionedThroughput = ProvisionedThroughputDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TableSizeBytes", targetDepth)) { tableDescription.TableSizeBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ItemCount", targetDepth)) { tableDescription.ItemCount = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LocalSecondaryIndexes", targetDepth)) { tableDescription.LocalSecondaryIndexes = new List <LocalSecondaryIndexDescription>(); LocalSecondaryIndexDescriptionUnmarshaller unmarshaller = LocalSecondaryIndexDescriptionUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { tableDescription.LocalSecondaryIndexes.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(tableDescription); } } return(tableDescription); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public DeploymentSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } DeploymentSummary unmarshalledObject = new DeploymentSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CompletedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CompletedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ConfigurationName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ConfigurationName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ConfigurationVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ConfigurationVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeploymentDurationInMinutes", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.DeploymentDurationInMinutes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeploymentNumber", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.DeploymentNumber = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FinalBakeTimeInMinutes", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; unmarshalledObject.FinalBakeTimeInMinutes = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GrowthFactor", targetDepth)) { var unmarshaller = FloatUnmarshaller.Instance; unmarshalledObject.GrowthFactor = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("GrowthType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.GrowthType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PercentageComplete", targetDepth)) { var unmarshaller = FloatUnmarshaller.Instance; unmarshalledObject.PercentageComplete = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("StartedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.StartedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("State", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.State = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { CreateDataSetResponse response = new CreateDataSetResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("Arn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Arn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AssetType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssetType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Id", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Id = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Origin", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Origin = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OriginDetails", targetDepth)) { var unmarshaller = OriginDetailsUnmarshaller.Instance; response.OriginDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SourceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SourceId = 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("UpdatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.UpdatedAt = 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 AutoMLJobSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } AutoMLJobSummary unmarshalledObject = new AutoMLJobSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AutoMLJobArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AutoMLJobArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AutoMLJobName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AutoMLJobName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AutoMLJobSecondaryStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AutoMLJobSecondaryStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("AutoMLJobStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.AutoMLJobStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("EndTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.EndTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FailureReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FailureReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public HyperParameterTrainingJobSummary Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } HyperParameterTrainingJobSummary unmarshalledObject = new HyperParameterTrainingJobSummary(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FailureReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.FailureReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("FinalHyperParameterTuningJobObjectiveMetric", targetDepth)) { var unmarshaller = FinalHyperParameterTuningJobObjectiveMetricUnmarshaller.Instance; unmarshalledObject.FinalHyperParameterTuningJobObjectiveMetric = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ObjectiveStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.ObjectiveStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrainingEndTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.TrainingEndTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrainingJobArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TrainingJobArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrainingJobDefinitionName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TrainingJobDefinitionName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrainingJobName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TrainingJobName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrainingJobStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TrainingJobStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrainingStartTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; unmarshalledObject.TrainingStartTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TunedHyperParameters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.TunedHyperParameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TuningJobName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.TuningJobName = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public JobDetail Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } JobDetail unmarshalledObject = new JobDetail(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("arrayProperties", targetDepth)) { var unmarshaller = ArrayPropertiesDetailUnmarshaller.Instance; unmarshalledObject.ArrayProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("attempts", targetDepth)) { var unmarshaller = new ListUnmarshaller <AttemptDetail, AttemptDetailUnmarshaller>(AttemptDetailUnmarshaller.Instance); unmarshalledObject.Attempts = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("container", targetDepth)) { var unmarshaller = ContainerDetailUnmarshaller.Instance; unmarshalledObject.Container = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("createdAt", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.CreatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("dependsOn", targetDepth)) { var unmarshaller = new ListUnmarshaller <JobDependency, JobDependencyUnmarshaller>(JobDependencyUnmarshaller.Instance); unmarshalledObject.DependsOn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobDefinition", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobDefinition = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("jobQueue", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.JobQueue = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nodeDetails", targetDepth)) { var unmarshaller = NodeDetailsUnmarshaller.Instance; unmarshalledObject.NodeDetails = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nodeProperties", targetDepth)) { var unmarshaller = NodePropertiesUnmarshaller.Instance; unmarshalledObject.NodeProperties = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("parameters", targetDepth)) { var unmarshaller = new DictionaryUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance); unmarshalledObject.Parameters = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("retryStrategy", targetDepth)) { var unmarshaller = RetryStrategyUnmarshaller.Instance; unmarshalledObject.RetryStrategy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("startedAt", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.StartedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("statusReason", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; unmarshalledObject.StatusReason = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("stoppedAt", targetDepth)) { var unmarshaller = LongUnmarshaller.Instance; unmarshalledObject.StoppedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("timeout", targetDepth)) { var unmarshaller = JobTimeoutUnmarshaller.Instance; unmarshalledObject.Timeout = unmarshaller.Unmarshall(context); continue; } } return(unmarshalledObject); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeTrialResponse response = new DescribeTrialResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("CreatedBy", targetDepth)) { var unmarshaller = UserContextUnmarshaller.Instance; response.CreatedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CreationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DisplayName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DisplayName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ExperimentName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ExperimentName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedBy", targetDepth)) { var unmarshaller = UserContextUnmarshaller.Instance; response.LastModifiedBy = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastModifiedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastModifiedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Source", targetDepth)) { var unmarshaller = TrialSourceUnmarshaller.Instance; response.Source = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrialArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TrialArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("TrialName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.TrialName = unmarshaller.Unmarshall(context); continue; } } return(response); }