/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeHealthStateChunk GetFromJsonProperties(JsonReader reader) { var healthState = default(HealthState?); var nodeName = default(NodeName); do { var propName = reader.ReadPropertyName(); if (string.Compare("HealthState", propName, StringComparison.Ordinal) == 0) { healthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeHealthStateChunk( healthState: healthState, nodeName: nodeName)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeResult GetFromJsonProperties(JsonReader reader) { var nodeName = default(NodeName); var nodeInstanceId = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstanceId", propName, StringComparison.Ordinal) == 0) { nodeInstanceId = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeResult( nodeName: nodeName, nodeInstanceId: nodeInstanceId)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeLoadInfo GetFromJsonProperties(JsonReader reader) { var nodeName = default(NodeName); var nodeLoadMetricInformation = default(IEnumerable <NodeLoadMetricInformation>); do { var propName = reader.ReadPropertyName(); if (string.Compare("NodeName", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeLoadMetricInformation", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeLoadMetricInformation = reader.ReadList(NodeLoadMetricInformationConverter.Deserialize); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeLoadInfo( nodeName: nodeName, nodeLoadMetricInformation: nodeLoadMetricInformation)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static DeployedApplicationHealthState GetFromJsonProperties(JsonReader reader) { var aggregatedHealthState = default(HealthState?); var nodeName = default(NodeName); var applicationName = default(ApplicationName); do { var propName = reader.ReadPropertyName(); if (string.Compare("AggregatedHealthState", propName, StringComparison.Ordinal) == 0) { aggregatedHealthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("ApplicationName", propName, StringComparison.Ordinal) == 0) { applicationName = ApplicationNameConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new DeployedApplicationHealthState( aggregatedHealthState: aggregatedHealthState, nodeName: nodeName, applicationName: applicationName)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeHealthState GetFromJsonProperties(JsonReader reader) { var aggregatedHealthState = default(HealthState?); var name = default(NodeName); var id = default(NodeId); do { var propName = reader.ReadPropertyName(); if (string.Compare("AggregatedHealthState", propName, StringComparison.Ordinal) == 0) { aggregatedHealthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("Name", propName, StringComparison.Ordinal) == 0) { name = NodeNameConverter.Deserialize(reader); } else if (string.Compare("Id", propName, StringComparison.Ordinal) == 0) { id = NodeIdConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeHealthState( aggregatedHealthState: aggregatedHealthState, name: name, id: id)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeUpgradeProgressInfo GetFromJsonProperties(JsonReader reader) { var nodeName = default(NodeName); var upgradePhase = default(NodeUpgradePhase?); var pendingSafetyChecks = default(IEnumerable <SafetyCheckWrapper>); do { var propName = reader.ReadPropertyName(); if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("UpgradePhase", propName, StringComparison.Ordinal) == 0) { upgradePhase = NodeUpgradePhaseConverter.Deserialize(reader); } else if (string.Compare("PendingSafetyChecks", propName, StringComparison.Ordinal) == 0) { pendingSafetyChecks = reader.ReadList(SafetyCheckWrapperConverter.Deserialize); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeUpgradeProgressInfo( nodeName: nodeName, upgradePhase: upgradePhase, pendingSafetyChecks: pendingSafetyChecks)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static StatefulServiceReplicaInfo GetFromJsonProperties(JsonReader reader) { var replicaStatus = default(ReplicaStatus?); var healthState = default(HealthState?); var nodeName = default(NodeName); var address = default(string); var lastInBuildDurationInSeconds = default(string); var replicaRole = default(ReplicaRole?); var replicaId = default(ReplicaId); do { var propName = reader.ReadPropertyName(); if (string.Compare("ReplicaStatus", propName, StringComparison.Ordinal) == 0) { replicaStatus = ReplicaStatusConverter.Deserialize(reader); } else if (string.Compare("HealthState", propName, StringComparison.Ordinal) == 0) { healthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("Address", propName, StringComparison.Ordinal) == 0) { address = reader.ReadValueAsString(); } else if (string.Compare("LastInBuildDurationInSeconds", propName, StringComparison.Ordinal) == 0) { lastInBuildDurationInSeconds = reader.ReadValueAsString(); } else if (string.Compare("ReplicaRole", propName, StringComparison.Ordinal) == 0) { replicaRole = ReplicaRoleConverter.Deserialize(reader); } else if (string.Compare("ReplicaId", propName, StringComparison.Ordinal) == 0) { replicaId = ReplicaIdConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new StatefulServiceReplicaInfo( replicaStatus: replicaStatus, healthState: healthState, nodeName: nodeName, address: address, lastInBuildDurationInSeconds: lastInBuildDurationInSeconds, replicaRole: replicaRole, replicaId: replicaId)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static DeployedServicePackageHealth GetFromJsonProperties(JsonReader reader) { var aggregatedHealthState = default(HealthState?); var healthEvents = default(IEnumerable <HealthEvent>); var unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>); var healthStatistics = default(HealthStatistics); var applicationName = default(ApplicationName); var serviceManifestName = default(string); var nodeName = default(NodeName); do { var propName = reader.ReadPropertyName(); if (string.Compare("AggregatedHealthState", propName, StringComparison.Ordinal) == 0) { aggregatedHealthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("HealthEvents", propName, StringComparison.Ordinal) == 0) { healthEvents = reader.ReadList(HealthEventConverter.Deserialize); } else if (string.Compare("UnhealthyEvaluations", propName, StringComparison.Ordinal) == 0) { unhealthyEvaluations = reader.ReadList(HealthEvaluationWrapperConverter.Deserialize); } else if (string.Compare("HealthStatistics", propName, StringComparison.Ordinal) == 0) { healthStatistics = HealthStatisticsConverter.Deserialize(reader); } else if (string.Compare("ApplicationName", propName, StringComparison.Ordinal) == 0) { applicationName = ApplicationNameConverter.Deserialize(reader); } else if (string.Compare("ServiceManifestName", propName, StringComparison.Ordinal) == 0) { serviceManifestName = reader.ReadValueAsString(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new DeployedServicePackageHealth( aggregatedHealthState: aggregatedHealthState, healthEvents: healthEvents, unhealthyEvaluations: unhealthyEvaluations, healthStatistics: healthStatistics, applicationName: applicationName, serviceManifestName: serviceManifestName, nodeName: nodeName)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeDeactivateStartEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); var nodeInstance = default(long?); var batchId = default(string); var deactivateIntent = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstance", propName, StringComparison.Ordinal) == 0) { nodeInstance = reader.ReadValueAsLong(); } else if (string.Compare("BatchId", propName, StringComparison.Ordinal) == 0) { batchId = reader.ReadValueAsString(); } else if (string.Compare("DeactivateIntent", propName, StringComparison.Ordinal) == 0) { deactivateIntent = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeDeactivateStartEvent( eventInstanceId: eventInstanceId, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName, nodeInstance: nodeInstance, batchId: batchId, deactivateIntent: deactivateIntent)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeUpEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var category = default(string); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); var nodeInstance = default(long?); var lastNodeDownAt = default(DateTime?); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("Category", propName, StringComparison.Ordinal) == 0) { category = reader.ReadValueAsString(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstance", propName, StringComparison.Ordinal) == 0) { nodeInstance = reader.ReadValueAsLong(); } else if (string.Compare("LastNodeDownAt", propName, StringComparison.Ordinal) == 0) { lastNodeDownAt = reader.ReadValueAsDateTime(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeUpEvent( eventInstanceId: eventInstanceId, category: category, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName, nodeInstance: nodeInstance, lastNodeDownAt: lastNodeDownAt)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static ChaosRestartNodeFaultScheduledEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); var nodeInstanceId = default(long?); var faultGroupId = default(Guid?); var faultId = default(Guid?); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstanceId", propName, StringComparison.Ordinal) == 0) { nodeInstanceId = reader.ReadValueAsLong(); } else if (string.Compare("FaultGroupId", propName, StringComparison.Ordinal) == 0) { faultGroupId = reader.ReadValueAsGuid(); } else if (string.Compare("FaultId", propName, StringComparison.Ordinal) == 0) { faultId = reader.ReadValueAsGuid(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ChaosRestartNodeFaultScheduledEvent( eventInstanceId: eventInstanceId, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName, nodeInstanceId: nodeInstanceId, faultGroupId: faultGroupId, faultId: faultId)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeHealth GetFromJsonProperties(JsonReader reader) { var aggregatedHealthState = default(HealthState?); var healthEvents = default(IEnumerable <HealthEvent>); var unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>); var healthStatistics = default(HealthStatistics); var name = default(NodeName); do { var propName = reader.ReadPropertyName(); if (string.Compare("AggregatedHealthState", propName, StringComparison.OrdinalIgnoreCase) == 0) { aggregatedHealthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("HealthEvents", propName, StringComparison.OrdinalIgnoreCase) == 0) { healthEvents = reader.ReadList(HealthEventConverter.Deserialize); } else if (string.Compare("UnhealthyEvaluations", propName, StringComparison.OrdinalIgnoreCase) == 0) { unhealthyEvaluations = reader.ReadList(HealthEvaluationWrapperConverter.Deserialize); } else if (string.Compare("HealthStatistics", propName, StringComparison.OrdinalIgnoreCase) == 0) { healthStatistics = HealthStatisticsConverter.Deserialize(reader); } else if (string.Compare("Name", propName, StringComparison.OrdinalIgnoreCase) == 0) { name = NodeNameConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeHealth( aggregatedHealthState: aggregatedHealthState, healthEvents: healthEvents, unhealthyEvaluations: unhealthyEvaluations, healthStatistics: healthStatistics, name: name)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static DeployedServicePackageHealthState GetFromJsonProperties(JsonReader reader) { var aggregatedHealthState = default(HealthState?); var nodeName = default(NodeName); var applicationName = default(ApplicationName); var serviceManifestName = default(string); var servicePackageActivationId = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("AggregatedHealthState", propName, StringComparison.OrdinalIgnoreCase) == 0) { aggregatedHealthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("NodeName", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("ApplicationName", propName, StringComparison.OrdinalIgnoreCase) == 0) { applicationName = ApplicationNameConverter.Deserialize(reader); } else if (string.Compare("ServiceManifestName", propName, StringComparison.OrdinalIgnoreCase) == 0) { serviceManifestName = reader.ReadValueAsString(); } else if (string.Compare("ServicePackageActivationId", propName, StringComparison.OrdinalIgnoreCase) == 0) { servicePackageActivationId = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new DeployedServicePackageHealthState( aggregatedHealthState: aggregatedHealthState, nodeName: nodeName, applicationName: applicationName, serviceManifestName: serviceManifestName, servicePackageActivationId: servicePackageActivationId)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static DeployServicePackageToNodeDescription GetFromJsonProperties(JsonReader reader) { var serviceManifestName = default(string); var applicationTypeName = default(string); var applicationTypeVersion = default(string); var nodeName = default(NodeName); var packageSharingPolicy = default(IEnumerable <PackageSharingPolicyInfo>); do { var propName = reader.ReadPropertyName(); if (string.Compare("ServiceManifestName", propName, StringComparison.Ordinal) == 0) { serviceManifestName = reader.ReadValueAsString(); } else if (string.Compare("ApplicationTypeName", propName, StringComparison.Ordinal) == 0) { applicationTypeName = reader.ReadValueAsString(); } else if (string.Compare("ApplicationTypeVersion", propName, StringComparison.Ordinal) == 0) { applicationTypeVersion = reader.ReadValueAsString(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("PackageSharingPolicy", propName, StringComparison.Ordinal) == 0) { packageSharingPolicy = reader.ReadList(PackageSharingPolicyInfoConverter.Deserialize); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new DeployServicePackageToNodeDescription( serviceManifestName: serviceManifestName, applicationTypeName: applicationTypeName, applicationTypeVersion: applicationTypeVersion, nodeName: nodeName, packageSharingPolicy: packageSharingPolicy)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static DeployedApplicationHealthEvaluation GetFromJsonProperties(JsonReader reader) { var aggregatedHealthState = default(HealthState?); var description = default(string); var nodeName = default(NodeName); var applicationName = default(ApplicationName); var unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>); do { var propName = reader.ReadPropertyName(); if (string.Compare("AggregatedHealthState", propName, StringComparison.Ordinal) == 0) { aggregatedHealthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("Description", propName, StringComparison.Ordinal) == 0) { description = reader.ReadValueAsString(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("ApplicationName", propName, StringComparison.Ordinal) == 0) { applicationName = ApplicationNameConverter.Deserialize(reader); } else if (string.Compare("UnhealthyEvaluations", propName, StringComparison.Ordinal) == 0) { unhealthyEvaluations = reader.ReadList(HealthEvaluationWrapperConverter.Deserialize); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new DeployedApplicationHealthEvaluation( aggregatedHealthState: aggregatedHealthState, description: description, nodeName: nodeName, applicationName: applicationName, unhealthyEvaluations: unhealthyEvaluations)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static ChaosPartitionSecondaryMoveScheduledEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var category = default(string); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var partitionId = default(PartitionId); var faultGroupId = default(Guid?); var faultId = default(Guid?); var serviceName = default(string); var sourceNode = default(NodeName); var destinationNode = default(NodeName); var forcedMove = default(bool?); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.OrdinalIgnoreCase) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("Category", propName, StringComparison.OrdinalIgnoreCase) == 0) { category = reader.ReadValueAsString(); } else if (string.Compare("TimeStamp", propName, StringComparison.OrdinalIgnoreCase) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.OrdinalIgnoreCase) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("PartitionId", propName, StringComparison.OrdinalIgnoreCase) == 0) { partitionId = PartitionIdConverter.Deserialize(reader); } else if (string.Compare("FaultGroupId", propName, StringComparison.OrdinalIgnoreCase) == 0) { faultGroupId = reader.ReadValueAsGuid(); } else if (string.Compare("FaultId", propName, StringComparison.OrdinalIgnoreCase) == 0) { faultId = reader.ReadValueAsGuid(); } else if (string.Compare("ServiceName", propName, StringComparison.OrdinalIgnoreCase) == 0) { serviceName = reader.ReadValueAsString(); } else if (string.Compare("SourceNode", propName, StringComparison.OrdinalIgnoreCase) == 0) { sourceNode = NodeNameConverter.Deserialize(reader); } else if (string.Compare("DestinationNode", propName, StringComparison.OrdinalIgnoreCase) == 0) { destinationNode = NodeNameConverter.Deserialize(reader); } else if (string.Compare("ForcedMove", propName, StringComparison.OrdinalIgnoreCase) == 0) { forcedMove = reader.ReadValueAsBool(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ChaosPartitionSecondaryMoveScheduledEvent( eventInstanceId: eventInstanceId, category: category, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, partitionId: partitionId, faultGroupId: faultGroupId, faultId: faultId, serviceName: serviceName, sourceNode: sourceNode, destinationNode: destinationNode, forcedMove: forcedMove)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeOpenedSuccessEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); var nodeInstance = default(long?); var nodeId = default(string); var upgradeDomain = default(string); var faultDomain = default(string); var ipAddressOrFQDN = default(string); var hostname = default(string); var isSeedNode = default(bool?); var nodeVersion = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstance", propName, StringComparison.Ordinal) == 0) { nodeInstance = reader.ReadValueAsLong(); } else if (string.Compare("NodeId", propName, StringComparison.Ordinal) == 0) { nodeId = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDomain", propName, StringComparison.Ordinal) == 0) { upgradeDomain = reader.ReadValueAsString(); } else if (string.Compare("FaultDomain", propName, StringComparison.Ordinal) == 0) { faultDomain = reader.ReadValueAsString(); } else if (string.Compare("IpAddressOrFQDN", propName, StringComparison.Ordinal) == 0) { ipAddressOrFQDN = reader.ReadValueAsString(); } else if (string.Compare("Hostname", propName, StringComparison.Ordinal) == 0) { hostname = reader.ReadValueAsString(); } else if (string.Compare("IsSeedNode", propName, StringComparison.Ordinal) == 0) { isSeedNode = reader.ReadValueAsBool(); } else if (string.Compare("NodeVersion", propName, StringComparison.Ordinal) == 0) { nodeVersion = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeOpenedSuccessEvent( eventInstanceId: eventInstanceId, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName, nodeInstance: nodeInstance, nodeId: nodeId, upgradeDomain: upgradeDomain, faultDomain: faultDomain, ipAddressOrFQDN: ipAddressOrFQDN, hostname: hostname, isSeedNode: isSeedNode, nodeVersion: nodeVersion)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeHealthReportExpiredEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); var nodeInstanceId = default(long?); var sourceId = default(string); var property = default(string); var healthState = default(string); var timeToLiveMs = default(long?); var sequenceNumber = default(long?); var description = default(string); var removeWhenExpired = default(bool?); var sourceUtcTimestamp = default(DateTime?); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstanceId", propName, StringComparison.Ordinal) == 0) { nodeInstanceId = reader.ReadValueAsLong(); } else if (string.Compare("SourceId", propName, StringComparison.Ordinal) == 0) { sourceId = reader.ReadValueAsString(); } else if (string.Compare("Property", propName, StringComparison.Ordinal) == 0) { property = reader.ReadValueAsString(); } else if (string.Compare("HealthState", propName, StringComparison.Ordinal) == 0) { healthState = reader.ReadValueAsString(); } else if (string.Compare("TimeToLiveMs", propName, StringComparison.Ordinal) == 0) { timeToLiveMs = reader.ReadValueAsLong(); } else if (string.Compare("SequenceNumber", propName, StringComparison.Ordinal) == 0) { sequenceNumber = reader.ReadValueAsLong(); } else if (string.Compare("Description", propName, StringComparison.Ordinal) == 0) { description = reader.ReadValueAsString(); } else if (string.Compare("RemoveWhenExpired", propName, StringComparison.Ordinal) == 0) { removeWhenExpired = reader.ReadValueAsBool(); } else if (string.Compare("SourceUtcTimestamp", propName, StringComparison.Ordinal) == 0) { sourceUtcTimestamp = reader.ReadValueAsDateTime(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeHealthReportExpiredEvent( eventInstanceId: eventInstanceId, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName, nodeInstanceId: nodeInstanceId, sourceId: sourceId, property: property, healthState: healthState, timeToLiveMs: timeToLiveMs, sequenceNumber: sequenceNumber, description: description, removeWhenExpired: removeWhenExpired, sourceUtcTimestamp: sourceUtcTimestamp)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static PartitionReconfigurationCompletedEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var partitionId = default(PartitionId); var nodeName = default(NodeName); var nodeInstanceId = default(string); var serviceType = default(string); var ccEpochDataLossVersion = default(long?); var ccEpochConfigVersion = default(long?); var reconfigType = default(string); var result = default(string); var phase0DurationMs = default(double?); var phase1DurationMs = default(double?); var phase2DurationMs = default(double?); var phase3DurationMs = default(double?); var phase4DurationMs = default(double?); var totalDurationMs = default(double?); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("PartitionId", propName, StringComparison.Ordinal) == 0) { partitionId = PartitionIdConverter.Deserialize(reader); } else if (string.Compare("NodeName", propName, StringComparison.Ordinal) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeInstanceId", propName, StringComparison.Ordinal) == 0) { nodeInstanceId = reader.ReadValueAsString(); } else if (string.Compare("ServiceType", propName, StringComparison.Ordinal) == 0) { serviceType = reader.ReadValueAsString(); } else if (string.Compare("CcEpochDataLossVersion", propName, StringComparison.Ordinal) == 0) { ccEpochDataLossVersion = reader.ReadValueAsLong(); } else if (string.Compare("CcEpochConfigVersion", propName, StringComparison.Ordinal) == 0) { ccEpochConfigVersion = reader.ReadValueAsLong(); } else if (string.Compare("ReconfigType", propName, StringComparison.Ordinal) == 0) { reconfigType = reader.ReadValueAsString(); } else if (string.Compare("Result", propName, StringComparison.Ordinal) == 0) { result = reader.ReadValueAsString(); } else if (string.Compare("Phase0DurationMs", propName, StringComparison.Ordinal) == 0) { phase0DurationMs = reader.ReadValueAsDouble(); } else if (string.Compare("Phase1DurationMs", propName, StringComparison.Ordinal) == 0) { phase1DurationMs = reader.ReadValueAsDouble(); } else if (string.Compare("Phase2DurationMs", propName, StringComparison.Ordinal) == 0) { phase2DurationMs = reader.ReadValueAsDouble(); } else if (string.Compare("Phase3DurationMs", propName, StringComparison.Ordinal) == 0) { phase3DurationMs = reader.ReadValueAsDouble(); } else if (string.Compare("Phase4DurationMs", propName, StringComparison.Ordinal) == 0) { phase4DurationMs = reader.ReadValueAsDouble(); } else if (string.Compare("TotalDurationMs", propName, StringComparison.Ordinal) == 0) { totalDurationMs = reader.ReadValueAsDouble(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new PartitionReconfigurationCompletedEvent( eventInstanceId: eventInstanceId, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, partitionId: partitionId, nodeName: nodeName, nodeInstanceId: nodeInstanceId, serviceType: serviceType, ccEpochDataLossVersion: ccEpochDataLossVersion, ccEpochConfigVersion: ccEpochConfigVersion, reconfigType: reconfigType, result: result, phase0DurationMs: phase0DurationMs, phase1DurationMs: phase1DurationMs, phase2DurationMs: phase2DurationMs, phase3DurationMs: phase3DurationMs, phase4DurationMs: phase4DurationMs, totalDurationMs: totalDurationMs)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from.</param> /// <returns>The object Value.</returns> internal static NodeEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var category = default(string); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); do { var propName = reader.ReadPropertyName(); if (propName.Equals("Kind", StringComparison.OrdinalIgnoreCase)) { var propValue = reader.ReadValueAsString(); if (propValue.Equals("NodeAborted", StringComparison.OrdinalIgnoreCase)) { return(NodeAbortedEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeAddedToCluster", StringComparison.OrdinalIgnoreCase)) { return(NodeAddedToClusterEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeClosed", StringComparison.OrdinalIgnoreCase)) { return(NodeClosedEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeDeactivateCompleted", StringComparison.OrdinalIgnoreCase)) { return(NodeDeactivateCompletedEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeDeactivateStarted", StringComparison.OrdinalIgnoreCase)) { return(NodeDeactivateStartedEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeDown", StringComparison.OrdinalIgnoreCase)) { return(NodeDownEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeNewHealthReport", StringComparison.OrdinalIgnoreCase)) { return(NodeNewHealthReportEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeHealthReportExpired", StringComparison.OrdinalIgnoreCase)) { return(NodeHealthReportExpiredEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeOpenSucceeded", StringComparison.OrdinalIgnoreCase)) { return(NodeOpenSucceededEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeOpenFailed", StringComparison.OrdinalIgnoreCase)) { return(NodeOpenFailedEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeRemovedFromCluster", StringComparison.OrdinalIgnoreCase)) { return(NodeRemovedFromClusterEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeUp", StringComparison.OrdinalIgnoreCase)) { return(NodeUpEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("ChaosNodeRestartScheduled", StringComparison.OrdinalIgnoreCase)) { return(ChaosNodeRestartScheduledEventConverter.GetFromJsonProperties(reader)); } else if (propValue.Equals("NodeEvent", StringComparison.OrdinalIgnoreCase)) { // kind specified as same type, deserialize using properties. } else { throw new InvalidOperationException("Unknown Discriminator."); } } else { if (string.Compare("EventInstanceId", propName, StringComparison.OrdinalIgnoreCase) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("Category", propName, StringComparison.OrdinalIgnoreCase) == 0) { category = reader.ReadValueAsString(); } else if (string.Compare("TimeStamp", propName, StringComparison.OrdinalIgnoreCase) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.OrdinalIgnoreCase) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } } }while (reader.TokenType != JsonToken.EndObject); return(new NodeEvent( kind: Common.FabricEventKind.NodeEvent, eventInstanceId: eventInstanceId, category: category, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeAddedToClusterEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var category = default(string); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var nodeName = default(NodeName); var nodeId = default(string); var nodeInstance = default(long?); var nodeType = default(string); var fabricVersion = default(string); var ipAddressOrFQDN = default(string); var nodeCapacities = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.OrdinalIgnoreCase) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("Category", propName, StringComparison.OrdinalIgnoreCase) == 0) { category = reader.ReadValueAsString(); } else if (string.Compare("TimeStamp", propName, StringComparison.OrdinalIgnoreCase) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.OrdinalIgnoreCase) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("NodeName", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("NodeId", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeId = reader.ReadValueAsString(); } else if (string.Compare("NodeInstance", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeInstance = reader.ReadValueAsLong(); } else if (string.Compare("NodeType", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeType = reader.ReadValueAsString(); } else if (string.Compare("FabricVersion", propName, StringComparison.OrdinalIgnoreCase) == 0) { fabricVersion = reader.ReadValueAsString(); } else if (string.Compare("IpAddressOrFQDN", propName, StringComparison.OrdinalIgnoreCase) == 0) { ipAddressOrFQDN = reader.ReadValueAsString(); } else if (string.Compare("NodeCapacities", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeCapacities = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeAddedToClusterEvent( eventInstanceId: eventInstanceId, category: category, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, nodeName: nodeName, nodeId: nodeId, nodeInstance: nodeInstance, nodeType: nodeType, fabricVersion: fabricVersion, ipAddressOrFQDN: ipAddressOrFQDN, nodeCapacities: nodeCapacities)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static PartitionPrimaryMoveAnalysisEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var category = default(string); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var partitionId = default(PartitionId); var metadata = default(AnalysisEventMetadata); var whenMoveCompleted = default(DateTime?); var previousNode = default(NodeName); var currentNode = default(NodeName); var moveReason = default(string); var relevantTraces = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.OrdinalIgnoreCase) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("Category", propName, StringComparison.OrdinalIgnoreCase) == 0) { category = reader.ReadValueAsString(); } else if (string.Compare("TimeStamp", propName, StringComparison.OrdinalIgnoreCase) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.OrdinalIgnoreCase) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("PartitionId", propName, StringComparison.OrdinalIgnoreCase) == 0) { partitionId = PartitionIdConverter.Deserialize(reader); } else if (string.Compare("Metadata", propName, StringComparison.OrdinalIgnoreCase) == 0) { metadata = AnalysisEventMetadataConverter.Deserialize(reader); } else if (string.Compare("WhenMoveCompleted", propName, StringComparison.OrdinalIgnoreCase) == 0) { whenMoveCompleted = reader.ReadValueAsDateTime(); } else if (string.Compare("PreviousNode", propName, StringComparison.OrdinalIgnoreCase) == 0) { previousNode = NodeNameConverter.Deserialize(reader); } else if (string.Compare("CurrentNode", propName, StringComparison.OrdinalIgnoreCase) == 0) { currentNode = NodeNameConverter.Deserialize(reader); } else if (string.Compare("MoveReason", propName, StringComparison.OrdinalIgnoreCase) == 0) { moveReason = reader.ReadValueAsString(); } else if (string.Compare("RelevantTraces", propName, StringComparison.OrdinalIgnoreCase) == 0) { relevantTraces = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new PartitionPrimaryMoveAnalysisEvent( eventInstanceId: eventInstanceId, category: category, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, partitionId: partitionId, metadata: metadata, whenMoveCompleted: whenMoveCompleted, previousNode: previousNode, currentNode: currentNode, moveReason: moveReason, relevantTraces: relevantTraces)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static ChaosMovePrimaryFaultScheduledEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var partitionId = default(PartitionId); var faultGroupId = default(Guid?); var faultId = default(Guid?); var serviceName = default(string); var nodeTo = default(NodeName); var forcedMove = default(bool?); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.Ordinal) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("TimeStamp", propName, StringComparison.Ordinal) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.Ordinal) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("PartitionId", propName, StringComparison.Ordinal) == 0) { partitionId = PartitionIdConverter.Deserialize(reader); } else if (string.Compare("FaultGroupId", propName, StringComparison.Ordinal) == 0) { faultGroupId = reader.ReadValueAsGuid(); } else if (string.Compare("FaultId", propName, StringComparison.Ordinal) == 0) { faultId = reader.ReadValueAsGuid(); } else if (string.Compare("ServiceName", propName, StringComparison.Ordinal) == 0) { serviceName = reader.ReadValueAsString(); } else if (string.Compare("NodeTo", propName, StringComparison.Ordinal) == 0) { nodeTo = NodeNameConverter.Deserialize(reader); } else if (string.Compare("ForcedMove", propName, StringComparison.Ordinal) == 0) { forcedMove = reader.ReadValueAsBool(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ChaosMovePrimaryFaultScheduledEvent( eventInstanceId: eventInstanceId, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, partitionId: partitionId, faultGroupId: faultGroupId, faultId: faultId, serviceName: serviceName, nodeTo: nodeTo, forcedMove: forcedMove)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static NodeInfo GetFromJsonProperties(JsonReader reader) { var name = default(NodeName); var ipAddressOrFQDN = default(string); var type = default(string); var codeVersion = default(string); var configVersion = default(string); var nodeStatus = default(NodeStatus?); var nodeUpTimeInSeconds = default(string); var healthState = default(HealthState?); var isSeedNode = default(bool?); var upgradeDomain = default(string); var faultDomain = default(string); var id = default(NodeId); var instanceId = default(string); var nodeDeactivationInfo = default(NodeDeactivationInfo); var isStopped = default(bool?); var nodeDownTimeInSeconds = default(string); var nodeUpAt = default(DateTime?); var nodeDownAt = default(DateTime?); do { var propName = reader.ReadPropertyName(); if (string.Compare("Name", propName, StringComparison.Ordinal) == 0) { name = NodeNameConverter.Deserialize(reader); } else if (string.Compare("IpAddressOrFQDN", propName, StringComparison.Ordinal) == 0) { ipAddressOrFQDN = reader.ReadValueAsString(); } else if (string.Compare("Type", propName, StringComparison.Ordinal) == 0) { type = reader.ReadValueAsString(); } else if (string.Compare("CodeVersion", propName, StringComparison.Ordinal) == 0) { codeVersion = reader.ReadValueAsString(); } else if (string.Compare("ConfigVersion", propName, StringComparison.Ordinal) == 0) { configVersion = reader.ReadValueAsString(); } else if (string.Compare("NodeStatus", propName, StringComparison.Ordinal) == 0) { nodeStatus = NodeStatusConverter.Deserialize(reader); } else if (string.Compare("NodeUpTimeInSeconds", propName, StringComparison.Ordinal) == 0) { nodeUpTimeInSeconds = reader.ReadValueAsString(); } else if (string.Compare("HealthState", propName, StringComparison.Ordinal) == 0) { healthState = HealthStateConverter.Deserialize(reader); } else if (string.Compare("IsSeedNode", propName, StringComparison.Ordinal) == 0) { isSeedNode = reader.ReadValueAsBool(); } else if (string.Compare("UpgradeDomain", propName, StringComparison.Ordinal) == 0) { upgradeDomain = reader.ReadValueAsString(); } else if (string.Compare("FaultDomain", propName, StringComparison.Ordinal) == 0) { faultDomain = reader.ReadValueAsString(); } else if (string.Compare("Id", propName, StringComparison.Ordinal) == 0) { id = NodeIdConverter.Deserialize(reader); } else if (string.Compare("InstanceId", propName, StringComparison.Ordinal) == 0) { instanceId = reader.ReadValueAsString(); } else if (string.Compare("NodeDeactivationInfo", propName, StringComparison.Ordinal) == 0) { nodeDeactivationInfo = NodeDeactivationInfoConverter.Deserialize(reader); } else if (string.Compare("IsStopped", propName, StringComparison.Ordinal) == 0) { isStopped = reader.ReadValueAsBool(); } else if (string.Compare("NodeDownTimeInSeconds", propName, StringComparison.Ordinal) == 0) { nodeDownTimeInSeconds = reader.ReadValueAsString(); } else if (string.Compare("NodeUpAt", propName, StringComparison.Ordinal) == 0) { nodeUpAt = reader.ReadValueAsDateTime(); } else if (string.Compare("NodeDownAt", propName, StringComparison.Ordinal) == 0) { nodeDownAt = reader.ReadValueAsDateTime(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new NodeInfo( name: name, ipAddressOrFQDN: ipAddressOrFQDN, type: type, codeVersion: codeVersion, configVersion: configVersion, nodeStatus: nodeStatus, nodeUpTimeInSeconds: nodeUpTimeInSeconds, healthState: healthState, isSeedNode: isSeedNode, upgradeDomain: upgradeDomain, faultDomain: faultDomain, id: id, instanceId: instanceId, nodeDeactivationInfo: nodeDeactivationInfo, isStopped: isStopped, nodeDownTimeInSeconds: nodeDownTimeInSeconds, nodeUpAt: nodeUpAt, nodeDownAt: nodeDownAt)); }
/// <summary> /// Gets the object from Json properties. /// </summary> /// <param name="reader">The <see cref="T: Newtonsoft.Json.JsonReader" /> to read from, reader must be placed at first property.</param> /// <returns>The object Value.</returns> internal static ChaosCodePackageRestartScheduledEvent GetFromJsonProperties(JsonReader reader) { var eventInstanceId = default(Guid?); var category = default(string); var timeStamp = default(DateTime?); var hasCorrelatedEvents = default(bool?); var applicationId = default(string); var faultGroupId = default(Guid?); var faultId = default(Guid?); var nodeName = default(NodeName); var serviceManifestName = default(string); var codePackageName = default(string); var servicePackageActivationId = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("EventInstanceId", propName, StringComparison.OrdinalIgnoreCase) == 0) { eventInstanceId = reader.ReadValueAsGuid(); } else if (string.Compare("Category", propName, StringComparison.OrdinalIgnoreCase) == 0) { category = reader.ReadValueAsString(); } else if (string.Compare("TimeStamp", propName, StringComparison.OrdinalIgnoreCase) == 0) { timeStamp = reader.ReadValueAsDateTime(); } else if (string.Compare("HasCorrelatedEvents", propName, StringComparison.OrdinalIgnoreCase) == 0) { hasCorrelatedEvents = reader.ReadValueAsBool(); } else if (string.Compare("ApplicationId", propName, StringComparison.OrdinalIgnoreCase) == 0) { applicationId = reader.ReadValueAsString(); } else if (string.Compare("FaultGroupId", propName, StringComparison.OrdinalIgnoreCase) == 0) { faultGroupId = reader.ReadValueAsGuid(); } else if (string.Compare("FaultId", propName, StringComparison.OrdinalIgnoreCase) == 0) { faultId = reader.ReadValueAsGuid(); } else if (string.Compare("NodeName", propName, StringComparison.OrdinalIgnoreCase) == 0) { nodeName = NodeNameConverter.Deserialize(reader); } else if (string.Compare("ServiceManifestName", propName, StringComparison.OrdinalIgnoreCase) == 0) { serviceManifestName = reader.ReadValueAsString(); } else if (string.Compare("CodePackageName", propName, StringComparison.OrdinalIgnoreCase) == 0) { codePackageName = reader.ReadValueAsString(); } else if (string.Compare("ServicePackageActivationId", propName, StringComparison.OrdinalIgnoreCase) == 0) { servicePackageActivationId = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ChaosCodePackageRestartScheduledEvent( eventInstanceId: eventInstanceId, category: category, timeStamp: timeStamp, hasCorrelatedEvents: hasCorrelatedEvents, applicationId: applicationId, faultGroupId: faultGroupId, faultId: faultId, nodeName: nodeName, serviceManifestName: serviceManifestName, codePackageName: codePackageName, servicePackageActivationId: servicePackageActivationId)); }