public static DescribeDeviceResponse Unmarshall(UnmarshallerContext context) { DescribeDeviceResponse describeDeviceResponse = new DescribeDeviceResponse(); describeDeviceResponse.HttpResponse = context.HttpResponse; describeDeviceResponse.RequestId = context.StringValue("DescribeDevice.RequestId"); describeDeviceResponse.Id = context.StringValue("DescribeDevice.Id"); describeDeviceResponse.Name = context.StringValue("DescribeDevice.Name"); describeDeviceResponse.Description = context.StringValue("DescribeDevice.Description"); describeDeviceResponse.GroupId = context.StringValue("DescribeDevice.GroupId"); describeDeviceResponse.ParentId = context.StringValue("DescribeDevice.ParentId"); describeDeviceResponse.DirectoryId = context.StringValue("DescribeDevice.DirectoryId"); describeDeviceResponse.Type = context.StringValue("DescribeDevice.Type"); describeDeviceResponse.AutoStart = context.BooleanValue("DescribeDevice.AutoStart"); describeDeviceResponse.Enabled = context.BooleanValue("DescribeDevice.Enabled"); describeDeviceResponse.Protocol = context.StringValue("DescribeDevice.Protocol"); describeDeviceResponse.Status = context.StringValue("DescribeDevice.Status"); describeDeviceResponse.GbId = context.StringValue("DescribeDevice.GbId"); describeDeviceResponse.Ip = context.StringValue("DescribeDevice.Ip"); describeDeviceResponse.Port = context.LongValue("DescribeDevice.Port"); describeDeviceResponse.Url = context.StringValue("DescribeDevice.Url"); describeDeviceResponse.Username = context.StringValue("DescribeDevice.Username"); describeDeviceResponse.Password = context.StringValue("DescribeDevice.Password"); describeDeviceResponse.Vendor = context.StringValue("DescribeDevice.Vendor"); describeDeviceResponse.Dsn = context.StringValue("DescribeDevice.Dsn"); describeDeviceResponse.Longitude = context.StringValue("DescribeDevice.Longitude"); describeDeviceResponse.Latitude = context.StringValue("DescribeDevice.Latitude"); describeDeviceResponse.AutoPos = context.BooleanValue("DescribeDevice.AutoPos"); describeDeviceResponse.PosInterval = context.LongValue("DescribeDevice.PosInterval"); describeDeviceResponse.AlarmMethod = context.StringValue("DescribeDevice.AlarmMethod"); describeDeviceResponse.CreatedTime = context.StringValue("DescribeDevice.CreatedTime"); describeDeviceResponse.RegisteredTime = context.StringValue("DescribeDevice.RegisteredTime"); describeDeviceResponse.ChannelSyncTime = context.StringValue("DescribeDevice.ChannelSyncTime"); describeDeviceResponse._Params = context.StringValue("DescribeDevice.Params"); DescribeDeviceResponse.DescribeDevice_Stats stats = new DescribeDeviceResponse.DescribeDevice_Stats(); stats.ChannelNum = context.LongValue("DescribeDevice.Stats.ChannelNum"); stats.StreamNum = context.LongValue("DescribeDevice.Stats.StreamNum"); stats.OnlineNum = context.LongValue("DescribeDevice.Stats.OnlineNum"); stats.OfflineNum = context.LongValue("DescribeDevice.Stats.OfflineNum"); stats.FailedNum = context.LongValue("DescribeDevice.Stats.FailedNum"); describeDeviceResponse.Stats = stats; DescribeDeviceResponse.DescribeDevice_Directory directory = new DescribeDeviceResponse.DescribeDevice_Directory(); directory.Id = context.StringValue("DescribeDevice.Directory.Id"); directory.Name = context.StringValue("DescribeDevice.Directory.Name"); directory.Description = context.StringValue("DescribeDevice.Directory.Description"); directory.GroupId = context.StringValue("DescribeDevice.Directory.GroupId"); directory.ParentId = context.StringValue("DescribeDevice.Directory.ParentId"); directory.CreatedTime = context.StringValue("DescribeDevice.Directory.CreatedTime"); describeDeviceResponse.Directory = directory; return(describeDeviceResponse); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDeviceResponse response = new DescribeDeviceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("deviceDescription", targetDepth)) { var unmarshaller = DeviceDescriptionUnmarshaller.Instance; response.DeviceDescription = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDeviceResponse response = new DescribeDeviceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("AgentVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AgentVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceFleetName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceFleetName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("IotThingName", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.IotThingName = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LatestHeartbeat", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LatestHeartbeat = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("MaxModels", targetDepth)) { var unmarshaller = IntUnmarshaller.Instance; response.MaxModels = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Models", targetDepth)) { var unmarshaller = new ListUnmarshaller <EdgeModel, EdgeModelUnmarshaller>(EdgeModelUnmarshaller.Instance); response.Models = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NextToken", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.NextToken = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("RegistrationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.RegistrationTime = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDeviceResponse response = new DescribeDeviceResponse(); 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("CreatedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.CreatedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CurrentNetworkingStatus", targetDepth)) { var unmarshaller = NetworkStatusUnmarshaller.Instance; response.CurrentNetworkingStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("CurrentSoftware", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.CurrentSoftware = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Description", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Description = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceConnectionStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceConnectionStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("DeviceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LatestSoftware", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.LatestSoftware = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LeaseExpirationTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LeaseExpirationTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Name", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Name = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("NetworkingConfiguration", targetDepth)) { var unmarshaller = NetworkPayloadUnmarshaller.Instance; response.NetworkingConfiguration = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("ProvisioningStatus", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ProvisioningStatus = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("SerialNumber", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.SerialNumber = 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("Type", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Type = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDeviceResponse response = new DescribeDeviceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("FirstAccessedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.FirstAccessedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("LastAccessedTime", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastAccessedTime = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Manufacturer", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Manufacturer = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Model", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Model = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OperatingSystem", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OperatingSystem = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("OperatingSystemVersion", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.OperatingSystemVersion = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("PatchLevel", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.PatchLevel = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Status", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Status = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("Username", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.Username = unmarshaller.Unmarshall(context); continue; } } return(response); }
/// <summary> /// Unmarshaller the response from the service to the response class. /// </summary> /// <param name="context"></param> /// <returns></returns> public override AmazonWebServiceResponse Unmarshall(JsonUnmarshallerContext context) { DescribeDeviceResponse response = new DescribeDeviceResponse(); context.Read(); int targetDepth = context.CurrentDepth; while (context.ReadAtDepth(targetDepth)) { if (context.TestExpression("associatedWithJob", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.AssociatedWithJob = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("deviceCapacities", targetDepth)) { var unmarshaller = new ListUnmarshaller <Capacity, CapacityUnmarshaller>(CapacityUnmarshaller.Instance); response.DeviceCapacities = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("deviceState", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceState = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("deviceType", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.DeviceType = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastReachedOutAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastReachedOutAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("lastUpdatedAt", targetDepth)) { var unmarshaller = DateTimeUnmarshaller.Instance; response.LastUpdatedAt = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("managedDeviceArn", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ManagedDeviceArn = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("managedDeviceId", targetDepth)) { var unmarshaller = StringUnmarshaller.Instance; response.ManagedDeviceId = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("physicalNetworkInterfaces", targetDepth)) { var unmarshaller = new ListUnmarshaller <PhysicalNetworkInterface, PhysicalNetworkInterfaceUnmarshaller>(PhysicalNetworkInterfaceUnmarshaller.Instance); response.PhysicalNetworkInterfaces = unmarshaller.Unmarshall(context); continue; } if (context.TestExpression("software", targetDepth)) { var unmarshaller = SoftwareInformationUnmarshaller.Instance; response.Software = 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); }