public DBSubnetGroup Unmarshall(XmlUnmarshallerContext context) { DBSubnetGroup dBSubnetGroup = new DBSubnetGroup(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DBSubnetGroupName", targetDepth)) { dBSubnetGroup.DBSubnetGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBSubnetGroupDescription", targetDepth)) { dBSubnetGroup.DBSubnetGroupDescription = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { dBSubnetGroup.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SubnetGroupStatus", targetDepth)) { dBSubnetGroup.SubnetGroupStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Subnets/Subnet", targetDepth)) { dBSubnetGroup.Subnets.Add(SubnetUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(dBSubnetGroup); } } return(dBSubnetGroup); }
public StartChildWorkflowExecutionInitiatedEventAttributes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } StartChildWorkflowExecutionInitiatedEventAttributes startChildWorkflowExecutionInitiatedEventAttributes = new StartChildWorkflowExecutionInitiatedEventAttributes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("workflowId", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("control", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("input", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.Input = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("executionStartToCloseTimeout", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.ExecutionStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskList", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.TaskList = TaskListUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("childPolicy", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.ChildPolicy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("taskStartToCloseTimeout", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.TaskStartToCloseTimeout = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagList", targetDepth)) { context.Read(); startChildWorkflowExecutionInitiatedEventAttributes.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; } startChildWorkflowExecutionInitiatedEventAttributes.TagList.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.CurrentDepth <= originalDepth) { return(startChildWorkflowExecutionInitiatedEventAttributes); } } return(startChildWorkflowExecutionInitiatedEventAttributes); }
public Instance Unmarshall(JsonUnmarshallerContext context) { Instance instance = new Instance(); instance.LayerIds = null; instance.SecurityGroupIds = 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("InstanceId", targetDepth)) { instance.InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2InstanceId", targetDepth)) { instance.Ec2InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Hostname", targetDepth)) { instance.Hostname = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { instance.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LayerIds", targetDepth)) { instance.LayerIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { instance.LayerIds.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("SecurityGroupIds", targetDepth)) { instance.SecurityGroupIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { instance.SecurityGroupIds.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("InstanceType", targetDepth)) { instance.InstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceProfileArn", targetDepth)) { instance.InstanceProfileArn = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { instance.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Os", targetDepth)) { instance.Os = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZone", targetDepth)) { instance.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PublicDns", targetDepth)) { instance.PublicDns = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PrivateDns", targetDepth)) { instance.PrivateDns = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PublicIp", targetDepth)) { instance.PublicIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PrivateIp", targetDepth)) { instance.PrivateIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ElasticIp", targetDepth)) { instance.ElasticIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutoScalingType", targetDepth)) { instance.AutoScalingType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SshKeyName", targetDepth)) { instance.SshKeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SshHostRsaKeyFingerprint", targetDepth)) { instance.SshHostRsaKeyFingerprint = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SshHostDsaKeyFingerprint", targetDepth)) { instance.SshHostDsaKeyFingerprint = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreatedAt", targetDepth)) { instance.CreatedAt = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastServiceErrorId", targetDepth)) { instance.LastServiceErrorId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Architecture", targetDepth)) { instance.Architecture = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RootDeviceType", targetDepth)) { instance.RootDeviceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("RootDeviceVolumeId", targetDepth)) { instance.RootDeviceVolumeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(instance); } } return(instance); }
public Stack Unmarshall(XmlUnmarshallerContext context) { Stack stack = new Stack(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("StackId", targetDepth)) { stack.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackName", targetDepth)) { stack.StackName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { stack.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Parameters/member", targetDepth)) { stack.Parameters.Add(ParameterUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("CreationTime", targetDepth)) { stack.CreationTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastUpdatedTime", targetDepth)) { stack.LastUpdatedTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackStatus", targetDepth)) { stack.StackStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackStatusReason", targetDepth)) { stack.StackStatusReason = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DisableRollback", targetDepth)) { stack.DisableRollback = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NotificationARNs/member", targetDepth)) { stack.NotificationARNs.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("TimeoutInMinutes", targetDepth)) { stack.TimeoutInMinutes = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Capabilities/member", targetDepth)) { stack.Capabilities.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Outputs/member", targetDepth)) { stack.Outputs.Add(OutputUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(stack); } } return(stack); }
public MultipartUpload Unmarshall(XmlUnmarshallerContext context) { MultipartUpload uploadsItem = new MultipartUpload(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Initiated", targetDepth)) { uploadsItem.Initiated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Initiator", targetDepth)) { uploadsItem.Initiator = InitiatorUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { uploadsItem.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Owner", targetDepth)) { uploadsItem.Owner = OwnerUnmarshaller.Instance.Unmarshall(context); continue; } if (context.TestExpression("StorageClass", targetDepth)) { uploadsItem.StorageClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("UploadId", targetDepth)) { uploadsItem.UploadId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(uploadsItem); } } return(uploadsItem); }
public JobFlowInstancesDetail Unmarshall(XmlUnmarshallerContext context) { JobFlowInstancesDetail jobFlowInstancesDetail = new JobFlowInstancesDetail(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("MasterInstanceType", targetDepth)) { jobFlowInstancesDetail.MasterInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterPublicDnsName", targetDepth)) { jobFlowInstancesDetail.MasterPublicDnsName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterInstanceId", targetDepth)) { jobFlowInstancesDetail.MasterInstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SlaveInstanceType", targetDepth)) { jobFlowInstancesDetail.SlaveInstanceType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceCount", targetDepth)) { jobFlowInstancesDetail.InstanceCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceGroups/member", targetDepth)) { jobFlowInstancesDetail.InstanceGroups.Add(InstanceGroupDetailUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("NormalizedInstanceHours", targetDepth)) { jobFlowInstancesDetail.NormalizedInstanceHours = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2KeyName", targetDepth)) { jobFlowInstancesDetail.Ec2KeyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Ec2SubnetId", targetDepth)) { jobFlowInstancesDetail.Ec2SubnetId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Placement", targetDepth)) { jobFlowInstancesDetail.Placement = PlacementTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("KeepJobFlowAliveWhenNoSteps", targetDepth)) { jobFlowInstancesDetail.KeepJobFlowAliveWhenNoSteps = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TerminationProtected", targetDepth)) { jobFlowInstancesDetail.TerminationProtected = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("HadoopVersion", targetDepth)) { jobFlowInstancesDetail.HadoopVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(jobFlowInstancesDetail); } } return(jobFlowInstancesDetail); }
public RequestCancelExternalWorkflowExecutionInitiatedEventAttributes Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } RequestCancelExternalWorkflowExecutionInitiatedEventAttributes requestCancelExternalWorkflowExecutionInitiatedEventAttributes = new RequestCancelExternalWorkflowExecutionInitiatedEventAttributes(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("workflowId", targetDepth)) { requestCancelExternalWorkflowExecutionInitiatedEventAttributes.WorkflowId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("runId", targetDepth)) { requestCancelExternalWorkflowExecutionInitiatedEventAttributes.RunId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("decisionTaskCompletedEventId", targetDepth)) { requestCancelExternalWorkflowExecutionInitiatedEventAttributes.DecisionTaskCompletedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("control", targetDepth)) { requestCancelExternalWorkflowExecutionInitiatedEventAttributes.Control = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(requestCancelExternalWorkflowExecutionInitiatedEventAttributes); }
public WeeklyAutoScalingSchedule Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } WeeklyAutoScalingSchedule weeklyAutoScalingSchedule = new WeeklyAutoScalingSchedule(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("Monday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Monday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Monday.Add(kvp.Key, kvp.Value); } continue; } if (context.TestExpression("Tuesday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Tuesday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Tuesday.Add(kvp.Key, kvp.Value); } continue; } if (context.TestExpression("Wednesday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Wednesday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Wednesday.Add(kvp.Key, kvp.Value); } continue; } if (context.TestExpression("Thursday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Thursday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Thursday.Add(kvp.Key, kvp.Value); } continue; } if (context.TestExpression("Friday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Friday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Friday.Add(kvp.Key, kvp.Value); } continue; } if (context.TestExpression("Saturday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Saturday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Saturday.Add(kvp.Key, kvp.Value); } continue; } if (context.TestExpression("Sunday", targetDepth)) { context.Read(); weeklyAutoScalingSchedule.Sunday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart || token == JsonToken.ObjectStart) { continue; } if (token == JsonToken.ArrayEnd || token == JsonToken.ObjectEnd) { break; } KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Sunday.Add(kvp.Key, kvp.Value); } continue; } if (context.CurrentDepth <= originalDepth) { return(weeklyAutoScalingSchedule); } } return(weeklyAutoScalingSchedule); }
public LiteralOptions Unmarshall(XmlUnmarshallerContext context) { LiteralOptions literalOptions = new LiteralOptions(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DefaultValue", targetDepth)) { literalOptions.DefaultValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceField", targetDepth)) { literalOptions.SourceField = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("FacetEnabled", targetDepth)) { literalOptions.FacetEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SearchEnabled", targetDepth)) { literalOptions.SearchEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReturnEnabled", targetDepth)) { literalOptions.ReturnEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SortEnabled", targetDepth)) { literalOptions.SortEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(literalOptions); } } return(literalOptions); }
public Address Unmarshall(XmlUnmarshallerContext context) { Address address = new Address(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("instanceId", targetDepth)) { address.InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("publicIp", targetDepth)) { address.PublicIp = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("allocationId", targetDepth)) { address.AllocationId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("associationId", targetDepth)) { address.AssociationId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("domain", targetDepth)) { address.Domain = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("networkInterfaceId", targetDepth)) { address.NetworkInterfaceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("networkInterfaceOwnerId", targetDepth)) { address.NetworkInterfaceOwnerId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("privateIpAddress", targetDepth)) { address.PrivateIpAddress = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(address); } } return(address); }
public Vpc Unmarshall(XmlUnmarshallerContext context) { Vpc vpc = new Vpc(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 1; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("vpcId", targetDepth)) { vpc.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("state", targetDepth)) { vpc.State = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("cidrBlock", targetDepth)) { vpc.CidrBlock = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("dhcpOptionsId", targetDepth)) { vpc.DhcpOptionsId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("tagSet/item", targetDepth)) { vpc.Tags.Add(TagUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("instanceTenancy", targetDepth)) { vpc.InstanceTenancy = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("isDefault", targetDepth)) { vpc.IsDefault = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(vpc); } } return(vpc); }
private static void UnmarshallResult(XmlUnmarshallerContext context, DescribeLoggingStatusResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("LoggingEnabled", targetDepth)) { response.LoggingEnabled = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("BucketName", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("S3KeyPrefix", targetDepth)) { response.S3KeyPrefix = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastSuccessfulDeliveryTime", targetDepth)) { response.LastSuccessfulDeliveryTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastFailureTime", targetDepth)) { response.LastFailureTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastFailureMessage", targetDepth)) { response.LastFailureMessage = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } return; }
public DBInstance Unmarshall(XmlUnmarshallerContext context) { DBInstance dBInstance = new DBInstance(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("DBInstanceIdentifier", targetDepth)) { dBInstance.DBInstanceIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBInstanceClass", targetDepth)) { dBInstance.DBInstanceClass = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Engine", targetDepth)) { dBInstance.Engine = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBInstanceStatus", targetDepth)) { dBInstance.DBInstanceStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterUsername", targetDepth)) { dBInstance.MasterUsername = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBName", targetDepth)) { dBInstance.DBName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Endpoint", targetDepth)) { dBInstance.Endpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AllocatedStorage", targetDepth)) { dBInstance.AllocatedStorage = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceCreateTime", targetDepth)) { dBInstance.InstanceCreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreferredBackupWindow", targetDepth)) { dBInstance.PreferredBackupWindow = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("BackupRetentionPeriod", targetDepth)) { dBInstance.BackupRetentionPeriod = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBSecurityGroups/DBSecurityGroup", targetDepth)) { dBInstance.DBSecurityGroups.Add(DBSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("VpcSecurityGroups/VpcSecurityGroupMembership", targetDepth)) { dBInstance.VpcSecurityGroups.Add(VpcSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("DBParameterGroups/DBParameterGroup", targetDepth)) { dBInstance.DBParameterGroups.Add(DBParameterGroupStatusUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("AvailabilityZone", targetDepth)) { dBInstance.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBSubnetGroup", targetDepth)) { dBInstance.DBSubnetGroup = DBSubnetGroupUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreferredMaintenanceWindow", targetDepth)) { dBInstance.PreferredMaintenanceWindow = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PendingModifiedValues", targetDepth)) { dBInstance.PendingModifiedValues = PendingModifiedValuesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LatestRestorableTime", targetDepth)) { dBInstance.LatestRestorableTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MultiAZ", targetDepth)) { dBInstance.MultiAZ = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EngineVersion", targetDepth)) { dBInstance.EngineVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutoMinorVersionUpgrade", targetDepth)) { dBInstance.AutoMinorVersionUpgrade = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReadReplicaSourceDBInstanceIdentifier", targetDepth)) { dBInstance.ReadReplicaSourceDBInstanceIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ReadReplicaDBInstanceIdentifiers/ReadReplicaDBInstanceIdentifier", targetDepth)) { dBInstance.ReadReplicaDBInstanceIdentifiers.Add(StringUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("LicenseModel", targetDepth)) { dBInstance.LicenseModel = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Iops", targetDepth)) { dBInstance.Iops = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("OptionGroupMemberships/OptionGroupMembership", targetDepth)) { dBInstance.OptionGroupMemberships.Add(OptionGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("CharacterSetName", targetDepth)) { dBInstance.CharacterSetName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SecondaryAvailabilityZone", targetDepth)) { dBInstance.SecondaryAvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PubliclyAccessible", targetDepth)) { dBInstance.PubliclyAccessible = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StatusInfos/DBInstanceStatusInfo", targetDepth)) { dBInstance.StatusInfos.Add(DBInstanceStatusInfoUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(dBInstance); } } return(dBInstance); }
public OptionSetting Unmarshall(XmlUnmarshallerContext context) { OptionSetting optionSetting = new OptionSetting(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) targetDepth += 2; while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Name", targetDepth)) { optionSetting.Name = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Value", targetDepth)) { optionSetting.Value = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DefaultValue", targetDepth)) { optionSetting.DefaultValue = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { optionSetting.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplyType", targetDepth)) { optionSetting.ApplyType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DataType", targetDepth)) { optionSetting.DataType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AllowedValues", targetDepth)) { optionSetting.AllowedValues = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsModifiable", targetDepth)) { optionSetting.IsModifiable = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("IsCollection", targetDepth)) { optionSetting.IsCollection = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return optionSetting; } } return optionSetting; }
public CreateEnvironmentResult Unmarshall(UnmarshallerContext context) { CreateEnvironmentResult createEnvironmentResult = new CreateEnvironmentResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("EnvironmentName", targetDepth)) { createEnvironmentResult.EnvironmentName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EnvironmentId", targetDepth)) { createEnvironmentResult.EnvironmentId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ApplicationName", targetDepth)) { createEnvironmentResult.ApplicationName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VersionLabel", targetDepth)) { createEnvironmentResult.VersionLabel = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SolutionStackName", targetDepth)) { createEnvironmentResult.SolutionStackName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("TemplateName", targetDepth)) { createEnvironmentResult.TemplateName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { createEnvironmentResult.Description = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("EndpointURL", targetDepth)) { createEnvironmentResult.EndpointURL = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CNAME", targetDepth)) { createEnvironmentResult.CNAME = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateCreated", targetDepth)) { createEnvironmentResult.DateCreated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DateUpdated", targetDepth)) { createEnvironmentResult.DateUpdated = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { createEnvironmentResult.Status = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Health", targetDepth)) { createEnvironmentResult.Health = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Resources", targetDepth)) { createEnvironmentResult.Resources = EnvironmentResourcesDescriptionUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(createEnvironmentResult); } } return(createEnvironmentResult); }
public WeeklyAutoScalingSchedule Unmarshall(JsonUnmarshallerContext context) { WeeklyAutoScalingSchedule weeklyAutoScalingSchedule = new WeeklyAutoScalingSchedule(); weeklyAutoScalingSchedule.Monday = null; weeklyAutoScalingSchedule.Tuesday = null; weeklyAutoScalingSchedule.Wednesday = null; weeklyAutoScalingSchedule.Thursday = null; weeklyAutoScalingSchedule.Friday = null; weeklyAutoScalingSchedule.Saturday = null; weeklyAutoScalingSchedule.Sunday = 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("Monday", targetDepth)) { weeklyAutoScalingSchedule.Monday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Monday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("Tuesday", targetDepth)) { weeklyAutoScalingSchedule.Tuesday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Tuesday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("Wednesday", targetDepth)) { weeklyAutoScalingSchedule.Wednesday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Wednesday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("Thursday", targetDepth)) { weeklyAutoScalingSchedule.Thursday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Thursday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("Friday", targetDepth)) { weeklyAutoScalingSchedule.Friday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Friday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("Saturday", targetDepth)) { weeklyAutoScalingSchedule.Saturday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Saturday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("Sunday", targetDepth)) { weeklyAutoScalingSchedule.Sunday = new Dictionary <String, String>(); KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.GetInstance(), StringUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, string> kvp = unmarshaller.Unmarshall(context); weeklyAutoScalingSchedule.Sunday.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(weeklyAutoScalingSchedule); } } return(weeklyAutoScalingSchedule); }
private static void UnmarshallResult(XmlUnmarshallerContext context, CompleteMultipartUploadResponse response) { int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("Location", targetDepth)) { response.Location = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Bucket", targetDepth)) { response.BucketName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Key", targetDepth)) { response.Key = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ETag", targetDepth)) { response.ETag = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return; } } IWebResponseData responseData = context.ResponseData; if (responseData.IsHeaderPresent("x-amz-expiration")) { response.Expiration = new Expiration(responseData.GetHeaderValue("x-amz-expiration")); } if (responseData.IsHeaderPresent("x-amz-server-side-encryption")) { response.ServerSideEncryptionMethod = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-server-side-encryption")); } if (responseData.IsHeaderPresent("x-amz-version-id")) { response.VersionId = S3Transforms.ToString(responseData.GetHeaderValue("x-amz-version-id")); } return; }
public Recipes Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } Recipes recipes = new Recipes(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("Setup", targetDepth)) { context.Read(); recipes.Setup = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } recipes.Setup.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("Configure", targetDepth)) { context.Read(); recipes.Configure = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } recipes.Configure.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("Deploy", targetDepth)) { context.Read(); recipes.Deploy = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } recipes.Deploy.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("Undeploy", targetDepth)) { context.Read(); recipes.Undeploy = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } recipes.Undeploy.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("Shutdown", targetDepth)) { context.Read(); recipes.Shutdown = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } recipes.Shutdown.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.CurrentDepth <= originalDepth) { return(recipes); } } return(recipes); }
public DecisionTask Unmarshall(JsonUnmarshallerContext context) { context.Read(); if (context.CurrentTokenType == JsonToken.Null) { return(null); } DecisionTask decisionTask = new DecisionTask(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("taskToken", targetDepth)) { decisionTask.TaskToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("startedEventId", targetDepth)) { decisionTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowExecution", targetDepth)) { decisionTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("workflowType", targetDepth)) { decisionTask.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("events", targetDepth)) { var unmarshaller = new ListUnmarshaller <HistoryEvent, HistoryEventUnmarshaller>( HistoryEventUnmarshaller.GetInstance()); decisionTask.Events = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("nextPageToken", targetDepth)) { decisionTask.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("previousStartedEventId", targetDepth)) { decisionTask.PreviousStartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } return(decisionTask); }
public Cluster Unmarshall(XmlUnmarshallerContext context) { Cluster cluster = new Cluster(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } if (context.IsStartOfDocument) { targetDepth++; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ClusterIdentifier", targetDepth)) { cluster.ClusterIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NodeType", targetDepth)) { cluster.NodeType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterStatus", targetDepth)) { cluster.ClusterStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ModifyStatus", targetDepth)) { cluster.ModifyStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MasterUsername", targetDepth)) { cluster.MasterUsername = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DBName", targetDepth)) { cluster.DBName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Endpoint", targetDepth)) { cluster.Endpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterCreateTime", targetDepth)) { cluster.ClusterCreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutomatedSnapshotRetentionPeriod", targetDepth)) { cluster.AutomatedSnapshotRetentionPeriod = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterSecurityGroups/ClusterSecurityGroup", targetDepth)) { cluster.ClusterSecurityGroups.Add(ClusterSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("VpcSecurityGroups/VpcSecurityGroup", targetDepth)) { cluster.VpcSecurityGroups.Add(VpcSecurityGroupMembershipUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ClusterParameterGroups/ClusterParameterGroup", targetDepth)) { cluster.ClusterParameterGroups.Add(ClusterParameterGroupStatusUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("ClusterSubnetGroupName", targetDepth)) { cluster.ClusterSubnetGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("VpcId", targetDepth)) { cluster.VpcId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AvailabilityZone", targetDepth)) { cluster.AvailabilityZone = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreferredMaintenanceWindow", targetDepth)) { cluster.PreferredMaintenanceWindow = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PendingModifiedValues", targetDepth)) { cluster.PendingModifiedValues = PendingModifiedValuesUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ClusterVersion", targetDepth)) { cluster.ClusterVersion = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AllowVersionUpgrade", targetDepth)) { cluster.AllowVersionUpgrade = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NumberOfNodes", targetDepth)) { cluster.NumberOfNodes = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PubliclyAccessible", targetDepth)) { cluster.PubliclyAccessible = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Encrypted", targetDepth)) { cluster.Encrypted = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(cluster); } } return(cluster); }
public DecisionTask Unmarshall(JsonUnmarshallerContext context) { DecisionTask decisionTask = new DecisionTask(); decisionTask.Events = 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("TaskToken", targetDepth)) { decisionTask.TaskToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StartedEventId", targetDepth)) { decisionTask.StartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowExecution", targetDepth)) { decisionTask.WorkflowExecution = WorkflowExecutionUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkflowType", targetDepth)) { decisionTask.WorkflowType = WorkflowTypeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Events", targetDepth)) { decisionTask.Events = new List <HistoryEvent>(); HistoryEventUnmarshaller unmarshaller = HistoryEventUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { decisionTask.Events.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("NextPageToken", targetDepth)) { decisionTask.NextPageToken = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PreviousStartedEventId", targetDepth)) { decisionTask.PreviousStartedEventId = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(decisionTask); } } return(decisionTask); }
public AttributeValue Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } AttributeValue attributeValue = new AttributeValue(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("S", targetDepth)) { context.Read(); attributeValue.S = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("N", targetDepth)) { context.Read(); attributeValue.N = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("B", targetDepth)) { context.Read(); attributeValue.B = MemoryStreamUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SS", targetDepth)) { context.Read(); attributeValue.SS = new List <String>(); if (context.CurrentTokenType == JsonToken.Null) { continue; } StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } attributeValue.SS.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("NS", targetDepth)) { context.Read(); attributeValue.NS = new List <String>(); if (context.CurrentTokenType == JsonToken.Null) { continue; } StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } attributeValue.NS.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.TestExpression("BS", targetDepth)) { context.Read(); attributeValue.BS = new List <MemoryStream>(); if (context.CurrentTokenType == JsonToken.Null) { continue; } MemoryStreamUnmarshaller unmarshaller = MemoryStreamUnmarshaller.GetInstance(); while (context.Read()) { JsonToken token = context.CurrentTokenType; if (token == JsonToken.ArrayStart) { continue; } if (token == JsonToken.ArrayEnd) { break; } attributeValue.BS.Add(unmarshaller.Unmarshall(context)); } continue; } if (context.CurrentDepth <= originalDepth) { return(attributeValue); } } return(attributeValue); }
public CacheNode Unmarshall(XmlUnmarshallerContext context) { CacheNode cacheNode = new CacheNode(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("CacheNodeId", targetDepth)) { cacheNode.CacheNodeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CacheNodeStatus", targetDepth)) { cacheNode.CacheNodeStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CacheNodeCreateTime", targetDepth)) { cacheNode.CacheNodeCreateTime = DateTimeUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Endpoint", targetDepth)) { cacheNode.Endpoint = EndpointUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ParameterGroupStatus", targetDepth)) { cacheNode.ParameterGroupStatus = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("SourceCacheNodeId", targetDepth)) { cacheNode.SourceCacheNodeId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(cacheNode); } } return(cacheNode); }
public DeleteItemResult Unmarshall(JsonUnmarshallerContext context) { DeleteItemResult deleteItemResult = new DeleteItemResult(); deleteItemResult.Attributes = 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("Attributes", targetDepth)) { deleteItemResult.Attributes = new Dictionary <String, AttributeValue>(); KeyValueUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new KeyValueUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance()); while (context.Read()) { if (((context.IsStartArray || context.IsStartElement || context.IsLeafValue) && (context.CurrentDepth == targetDepth)) || ((context.IsKey) && (context.CurrentDepth == targetDepth + 1))) { KeyValuePair <string, AttributeValue> kvp = unmarshaller.Unmarshall(context); deleteItemResult.Attributes.Add(kvp.Key, kvp.Value); } else if (context.IsEndElement) { break; } } continue; } if (context.TestExpression("ConsumedCapacityUnits", targetDepth)) { deleteItemResult.ConsumedCapacityUnits = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(deleteItemResult); } } return(deleteItemResult); }
public ScanResult Unmarshall(JsonUnmarshallerContext context) { ScanResult scanResult = new ScanResult(); scanResult.Items = 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("Items", targetDepth)) { scanResult.Items = new List <Dictionary <string, AttributeValue> >(); DictionaryUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller> unmarshaller = new DictionaryUnmarshaller <string, AttributeValue, StringUnmarshaller, AttributeValueUnmarshaller>(StringUnmarshaller.GetInstance(), AttributeValueUnmarshaller.GetInstance()); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { scanResult.Items.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("Count", targetDepth)) { scanResult.Count = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ScannedCount", targetDepth)) { scanResult.ScannedCount = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("LastEvaluatedKey", targetDepth)) { scanResult.LastEvaluatedKey = KeyUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ConsumedCapacityUnits", targetDepth)) { scanResult.ConsumedCapacityUnits = DoubleUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(scanResult); } } return(scanResult); }
public EnvironmentResourceDescription Unmarshall(XmlUnmarshallerContext context) { EnvironmentResourceDescription environmentResourceDescription = new EnvironmentResourceDescription(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("EnvironmentName", targetDepth)) { environmentResourceDescription.EnvironmentName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AutoScalingGroups/member", targetDepth)) { environmentResourceDescription.AutoScalingGroups.Add(AutoScalingGroupUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Instances/member", targetDepth)) { environmentResourceDescription.Instances.Add(InstanceUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("LaunchConfigurations/member", targetDepth)) { environmentResourceDescription.LaunchConfigurations.Add(LaunchConfigurationUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("LoadBalancers/member", targetDepth)) { environmentResourceDescription.LoadBalancers.Add(LoadBalancerUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("Triggers/member", targetDepth)) { environmentResourceDescription.Triggers.Add(TriggerUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(environmentResourceDescription); } } return(environmentResourceDescription); }
public ListResourceRecordSetsResult Unmarshall(XmlUnmarshallerContext context) { ListResourceRecordSetsResult listResourceRecordSetsResult = new ListResourceRecordSetsResult(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("ResourceRecordSets/ResourceRecordSet", targetDepth)) { listResourceRecordSetsResult.ResourceRecordSets.Add(ResourceRecordSetUnmarshaller.GetInstance().Unmarshall(context)); continue; } if (context.TestExpression("IsTruncated", targetDepth)) { listResourceRecordSetsResult.IsTruncated = BoolUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextRecordName", targetDepth)) { listResourceRecordSetsResult.NextRecordName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextRecordType", targetDepth)) { listResourceRecordSetsResult.NextRecordType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("NextRecordIdentifier", targetDepth)) { listResourceRecordSetsResult.NextRecordIdentifier = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("MaxItems", targetDepth)) { listResourceRecordSetsResult.MaxItems = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(listResourceRecordSetsResult); } } return(listResourceRecordSetsResult); }
public DescribeWorkingStorageResult Unmarshall(JsonUnmarshallerContext context) { DescribeWorkingStorageResult describeWorkingStorageResult = new DescribeWorkingStorageResult(); describeWorkingStorageResult.DiskIds = 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("GatewayARN", targetDepth)) { describeWorkingStorageResult.GatewayARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("DiskIds", targetDepth)) { describeWorkingStorageResult.DiskIds = new List <String>(); StringUnmarshaller unmarshaller = StringUnmarshaller.GetInstance(); while (context.Read()) { if ((context.IsArrayElement) && (context.CurrentDepth == targetDepth)) { describeWorkingStorageResult.DiskIds.Add(unmarshaller.Unmarshall(context)); } else if (context.IsEndArray) { break; } } continue; } if (context.TestExpression("WorkingStorageUsedInBytes", targetDepth)) { describeWorkingStorageResult.WorkingStorageUsedInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("WorkingStorageAllocatedInBytes", targetDepth)) { describeWorkingStorageResult.WorkingStorageAllocatedInBytes = LongUnmarshaller.GetInstance().Unmarshall(context); continue; } } else if (context.IsEndElement && context.CurrentDepth <= originalDepth) { return(describeWorkingStorageResult); } } return(describeWorkingStorageResult); }
public ScalingPolicy Unmarshall(UnmarshallerContext context) { ScalingPolicy scalingPolicy = new ScalingPolicy(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; if (context.IsStartOfDocument) { targetDepth += 2; } while (context.Read()) { if (context.IsStartElement || context.IsAttribute) { if (context.TestExpression("AutoScalingGroupName", targetDepth)) { scalingPolicy.AutoScalingGroupName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PolicyName", targetDepth)) { scalingPolicy.PolicyName = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("ScalingAdjustment", targetDepth)) { scalingPolicy.ScalingAdjustment = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("AdjustmentType", targetDepth)) { scalingPolicy.AdjustmentType = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Cooldown", targetDepth)) { scalingPolicy.Cooldown = IntUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("PolicyARN", targetDepth)) { scalingPolicy.PolicyARN = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Alarms/member", targetDepth)) { scalingPolicy.Alarms.Add(AlarmUnmarshaller.GetInstance().Unmarshall(context)); continue; } } else if (context.IsEndElement && context.CurrentDepth < originalDepth) { return(scalingPolicy); } } return(scalingPolicy); }
public ServiceError Unmarshall(JsonUnmarshallerContext context) { if (context.CurrentTokenType == JsonToken.Null) { return(null); } ServiceError serviceError = new ServiceError(); int originalDepth = context.CurrentDepth; int targetDepth = originalDepth + 1; while (context.Read()) { if (context.TestExpression("ServiceErrorId", targetDepth)) { context.Read(); serviceError.ServiceErrorId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("StackId", targetDepth)) { context.Read(); serviceError.StackId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("InstanceId", targetDepth)) { context.Read(); serviceError.InstanceId = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Type", targetDepth)) { context.Read(); serviceError.Type = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("Message", targetDepth)) { context.Read(); serviceError.Message = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.TestExpression("CreatedAt", targetDepth)) { context.Read(); serviceError.CreatedAt = StringUnmarshaller.GetInstance().Unmarshall(context); continue; } if (context.CurrentDepth <= originalDepth) { return(serviceError); } } return(serviceError); }