/// <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 StartClusterUpgradeDescription GetFromJsonProperties(JsonReader reader) { var codeVersion = default(string); var configVersion = default(string); var upgradeKind = default(UpgradeKind?); var rollingUpgradeMode = default(UpgradeMode?); var upgradeReplicaSetCheckTimeoutInSeconds = default(long?); var forceRestart = default(bool?); var monitoringPolicy = default(MonitoringPolicyDescription); var clusterHealthPolicy = default(ClusterHealthPolicy); var enableDeltaHealthEvaluation = default(bool?); var clusterUpgradeHealthPolicy = default(ClusterUpgradeHealthPolicyObject); var applicationHealthPolicyMap = default(ApplicationHealthPolicies); do { var propName = reader.ReadPropertyName(); 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("UpgradeKind", propName, StringComparison.Ordinal) == 0) { upgradeKind = UpgradeKindConverter.Deserialize(reader); } else if (string.Compare("RollingUpgradeMode", propName, StringComparison.Ordinal) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("UpgradeReplicaSetCheckTimeoutInSeconds", propName, StringComparison.Ordinal) == 0) { upgradeReplicaSetCheckTimeoutInSeconds = reader.ReadValueAsLong(); } else if (string.Compare("ForceRestart", propName, StringComparison.Ordinal) == 0) { forceRestart = reader.ReadValueAsBool(); } else if (string.Compare("MonitoringPolicy", propName, StringComparison.Ordinal) == 0) { monitoringPolicy = MonitoringPolicyDescriptionConverter.Deserialize(reader); } else if (string.Compare("ClusterHealthPolicy", propName, StringComparison.Ordinal) == 0) { clusterHealthPolicy = ClusterHealthPolicyConverter.Deserialize(reader); } else if (string.Compare("EnableDeltaHealthEvaluation", propName, StringComparison.Ordinal) == 0) { enableDeltaHealthEvaluation = reader.ReadValueAsBool(); } else if (string.Compare("ClusterUpgradeHealthPolicy", propName, StringComparison.Ordinal) == 0) { clusterUpgradeHealthPolicy = ClusterUpgradeHealthPolicyObjectConverter.Deserialize(reader); } else if (string.Compare("ApplicationHealthPolicyMap", propName, StringComparison.Ordinal) == 0) { applicationHealthPolicyMap = ApplicationHealthPoliciesConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new StartClusterUpgradeDescription( codeVersion: codeVersion, configVersion: configVersion, upgradeKind: upgradeKind, rollingUpgradeMode: rollingUpgradeMode, upgradeReplicaSetCheckTimeoutInSeconds: upgradeReplicaSetCheckTimeoutInSeconds, forceRestart: forceRestart, monitoringPolicy: monitoringPolicy, clusterHealthPolicy: clusterHealthPolicy, enableDeltaHealthEvaluation: enableDeltaHealthEvaluation, clusterUpgradeHealthPolicy: clusterUpgradeHealthPolicy, applicationHealthPolicyMap: applicationHealthPolicyMap)); }
/// <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 ComposeDeploymentUpgradeDescription GetFromJsonProperties(JsonReader reader) { var deploymentName = default(string); var composeFileContent = default(string); var registryCredential = default(RegistryCredential); var upgradeKind = default(UpgradeKind?); var rollingUpgradeMode = default(UpgradeMode?); var upgradeReplicaSetCheckTimeoutInSeconds = default(long?); var forceRestart = default(bool?); var monitoringPolicy = default(MonitoringPolicyDescription); var applicationHealthPolicy = default(ApplicationHealthPolicy); do { var propName = reader.ReadPropertyName(); if (string.Compare("DeploymentName", propName, StringComparison.Ordinal) == 0) { deploymentName = reader.ReadValueAsString(); } else if (string.Compare("ComposeFileContent", propName, StringComparison.Ordinal) == 0) { composeFileContent = reader.ReadValueAsString(); } else if (string.Compare("RegistryCredential", propName, StringComparison.Ordinal) == 0) { registryCredential = RegistryCredentialConverter.Deserialize(reader); } else if (string.Compare("UpgradeKind", propName, StringComparison.Ordinal) == 0) { upgradeKind = UpgradeKindConverter.Deserialize(reader); } else if (string.Compare("RollingUpgradeMode", propName, StringComparison.Ordinal) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("UpgradeReplicaSetCheckTimeoutInSeconds", propName, StringComparison.Ordinal) == 0) { upgradeReplicaSetCheckTimeoutInSeconds = reader.ReadValueAsLong(); } else if (string.Compare("ForceRestart", propName, StringComparison.Ordinal) == 0) { forceRestart = reader.ReadValueAsBool(); } else if (string.Compare("MonitoringPolicy", propName, StringComparison.Ordinal) == 0) { monitoringPolicy = MonitoringPolicyDescriptionConverter.Deserialize(reader); } else if (string.Compare("ApplicationHealthPolicy", propName, StringComparison.Ordinal) == 0) { applicationHealthPolicy = ApplicationHealthPolicyConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ComposeDeploymentUpgradeDescription( deploymentName: deploymentName, composeFileContent: composeFileContent, registryCredential: registryCredential, upgradeKind: upgradeKind, rollingUpgradeMode: rollingUpgradeMode, upgradeReplicaSetCheckTimeoutInSeconds: upgradeReplicaSetCheckTimeoutInSeconds, forceRestart: forceRestart, monitoringPolicy: monitoringPolicy, applicationHealthPolicy: applicationHealthPolicy)); }
/// <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 ApplicationUpgradeDescription GetFromJsonProperties(JsonReader reader) { var name = default(string); var targetApplicationTypeVersion = default(string); var parameters = default(IReadOnlyDictionary <string, string>); var upgradeKind = default(UpgradeKind?); var rollingUpgradeMode = default(UpgradeMode?); var upgradeReplicaSetCheckTimeoutInSeconds = default(long?); var forceRestart = default(bool?); var monitoringPolicy = default(MonitoringPolicyDescription); var applicationHealthPolicy = default(ApplicationHealthPolicy); do { var propName = reader.ReadPropertyName(); if (string.Compare("Name", propName, StringComparison.Ordinal) == 0) { name = reader.ReadValueAsString(); } else if (string.Compare("TargetApplicationTypeVersion", propName, StringComparison.Ordinal) == 0) { targetApplicationTypeVersion = reader.ReadValueAsString(); } else if (string.Compare("Parameters", propName, StringComparison.Ordinal) == 0) { parameters = ApplicationParametersConverter.Deserialize(reader); } else if (string.Compare("UpgradeKind", propName, StringComparison.Ordinal) == 0) { upgradeKind = UpgradeKindConverter.Deserialize(reader); } else if (string.Compare("RollingUpgradeMode", propName, StringComparison.Ordinal) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("UpgradeReplicaSetCheckTimeoutInSeconds", propName, StringComparison.Ordinal) == 0) { upgradeReplicaSetCheckTimeoutInSeconds = reader.ReadValueAsLong(); } else if (string.Compare("ForceRestart", propName, StringComparison.Ordinal) == 0) { forceRestart = reader.ReadValueAsBool(); } else if (string.Compare("MonitoringPolicy", propName, StringComparison.Ordinal) == 0) { monitoringPolicy = MonitoringPolicyDescriptionConverter.Deserialize(reader); } else if (string.Compare("ApplicationHealthPolicy", propName, StringComparison.Ordinal) == 0) { applicationHealthPolicy = ApplicationHealthPolicyConverter.Deserialize(reader); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ApplicationUpgradeDescription( name: name, targetApplicationTypeVersion: targetApplicationTypeVersion, parameters: parameters, upgradeKind: upgradeKind, rollingUpgradeMode: rollingUpgradeMode, upgradeReplicaSetCheckTimeoutInSeconds: upgradeReplicaSetCheckTimeoutInSeconds, forceRestart: forceRestart, monitoringPolicy: monitoringPolicy, applicationHealthPolicy: applicationHealthPolicy)); }
/// <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 ApplicationUpgradeProgressInfo GetFromJsonProperties(JsonReader reader) { var name = default(string); var typeName = default(string); var targetApplicationTypeVersion = default(string); var upgradeDomains = default(IEnumerable <UpgradeDomainInfo>); var upgradeState = default(UpgradeState?); var nextUpgradeDomain = default(string); var rollingUpgradeMode = default(UpgradeMode?); var upgradeDescription = default(ApplicationUpgradeDescription); var upgradeDurationInMilliseconds = default(string); var upgradeDomainDurationInMilliseconds = default(string); var unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>); var currentUpgradeDomainProgress = default(CurrentUpgradeDomainProgressInfo); var startTimestampUtc = default(string); var failureTimestampUtc = default(string); var failureReason = default(FailureReason?); var upgradeDomainProgressAtFailure = default(FailureUpgradeDomainProgressInfo); var upgradeStatusDetails = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("Name", propName, StringComparison.Ordinal) == 0) { name = reader.ReadValueAsString(); } else if (string.Compare("TypeName", propName, StringComparison.Ordinal) == 0) { typeName = reader.ReadValueAsString(); } else if (string.Compare("TargetApplicationTypeVersion", propName, StringComparison.Ordinal) == 0) { targetApplicationTypeVersion = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDomains", propName, StringComparison.Ordinal) == 0) { upgradeDomains = reader.ReadList(UpgradeDomainInfoConverter.Deserialize); } else if (string.Compare("UpgradeState", propName, StringComparison.Ordinal) == 0) { upgradeState = UpgradeStateConverter.Deserialize(reader); } else if (string.Compare("NextUpgradeDomain", propName, StringComparison.Ordinal) == 0) { nextUpgradeDomain = reader.ReadValueAsString(); } else if (string.Compare("RollingUpgradeMode", propName, StringComparison.Ordinal) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("UpgradeDescription", propName, StringComparison.Ordinal) == 0) { upgradeDescription = ApplicationUpgradeDescriptionConverter.Deserialize(reader); } else if (string.Compare("UpgradeDurationInMilliseconds", propName, StringComparison.Ordinal) == 0) { upgradeDurationInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDomainDurationInMilliseconds", propName, StringComparison.Ordinal) == 0) { upgradeDomainDurationInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("UnhealthyEvaluations", propName, StringComparison.Ordinal) == 0) { unhealthyEvaluations = reader.ReadList(HealthEvaluationWrapperConverter.Deserialize); } else if (string.Compare("CurrentUpgradeDomainProgress", propName, StringComparison.Ordinal) == 0) { currentUpgradeDomainProgress = CurrentUpgradeDomainProgressInfoConverter.Deserialize(reader); } else if (string.Compare("StartTimestampUtc", propName, StringComparison.Ordinal) == 0) { startTimestampUtc = reader.ReadValueAsString(); } else if (string.Compare("FailureTimestampUtc", propName, StringComparison.Ordinal) == 0) { failureTimestampUtc = reader.ReadValueAsString(); } else if (string.Compare("FailureReason", propName, StringComparison.Ordinal) == 0) { failureReason = FailureReasonConverter.Deserialize(reader); } else if (string.Compare("UpgradeDomainProgressAtFailure", propName, StringComparison.Ordinal) == 0) { upgradeDomainProgressAtFailure = FailureUpgradeDomainProgressInfoConverter.Deserialize(reader); } else if (string.Compare("UpgradeStatusDetails", propName, StringComparison.Ordinal) == 0) { upgradeStatusDetails = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ApplicationUpgradeProgressInfo( name: name, typeName: typeName, targetApplicationTypeVersion: targetApplicationTypeVersion, upgradeDomains: upgradeDomains, upgradeState: upgradeState, nextUpgradeDomain: nextUpgradeDomain, rollingUpgradeMode: rollingUpgradeMode, upgradeDescription: upgradeDescription, upgradeDurationInMilliseconds: upgradeDurationInMilliseconds, upgradeDomainDurationInMilliseconds: upgradeDomainDurationInMilliseconds, unhealthyEvaluations: unhealthyEvaluations, currentUpgradeDomainProgress: currentUpgradeDomainProgress, startTimestampUtc: startTimestampUtc, failureTimestampUtc: failureTimestampUtc, failureReason: failureReason, upgradeDomainProgressAtFailure: upgradeDomainProgressAtFailure, upgradeStatusDetails: upgradeStatusDetails)); }
/// <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 RollingUpgradeUpdateDescription GetFromJsonProperties(JsonReader reader) { var rollingUpgradeMode = default(UpgradeMode?); var forceRestart = default(bool?); var replicaSetCheckTimeoutInMilliseconds = default(long?); var failureAction = default(FailureAction?); var healthCheckWaitDurationInMilliseconds = default(string); var healthCheckStableDurationInMilliseconds = default(string); var healthCheckRetryTimeoutInMilliseconds = default(string); var upgradeTimeoutInMilliseconds = default(string); var upgradeDomainTimeoutInMilliseconds = default(string); var instanceCloseDelayDurationInSeconds = default(long?); do { var propName = reader.ReadPropertyName(); if (string.Compare("RollingUpgradeMode", propName, StringComparison.OrdinalIgnoreCase) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("ForceRestart", propName, StringComparison.OrdinalIgnoreCase) == 0) { forceRestart = reader.ReadValueAsBool(); } else if (string.Compare("ReplicaSetCheckTimeoutInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { replicaSetCheckTimeoutInMilliseconds = reader.ReadValueAsLong(); } else if (string.Compare("FailureAction", propName, StringComparison.OrdinalIgnoreCase) == 0) { failureAction = FailureActionConverter.Deserialize(reader); } else if (string.Compare("HealthCheckWaitDurationInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { healthCheckWaitDurationInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("HealthCheckStableDurationInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { healthCheckStableDurationInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("HealthCheckRetryTimeoutInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { healthCheckRetryTimeoutInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("UpgradeTimeoutInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeTimeoutInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDomainTimeoutInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeDomainTimeoutInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("InstanceCloseDelayDurationInSeconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { instanceCloseDelayDurationInSeconds = reader.ReadValueAsLong(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new RollingUpgradeUpdateDescription( rollingUpgradeMode: rollingUpgradeMode, forceRestart: forceRestart, replicaSetCheckTimeoutInMilliseconds: replicaSetCheckTimeoutInMilliseconds, failureAction: failureAction, healthCheckWaitDurationInMilliseconds: healthCheckWaitDurationInMilliseconds, healthCheckStableDurationInMilliseconds: healthCheckStableDurationInMilliseconds, healthCheckRetryTimeoutInMilliseconds: healthCheckRetryTimeoutInMilliseconds, upgradeTimeoutInMilliseconds: upgradeTimeoutInMilliseconds, upgradeDomainTimeoutInMilliseconds: upgradeDomainTimeoutInMilliseconds, instanceCloseDelayDurationInSeconds: instanceCloseDelayDurationInSeconds)); }
/// <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 ClusterUpgradeProgressObject GetFromJsonProperties(JsonReader reader) { var codeVersion = default(string); var configVersion = default(string); var upgradeDomains = default(IEnumerable <UpgradeDomainInfo>); var upgradeUnits = default(IEnumerable <UpgradeUnitInfo>); var upgradeState = default(UpgradeState?); var nextUpgradeDomain = default(string); var rollingUpgradeMode = default(UpgradeMode?); var upgradeDescription = default(ClusterUpgradeDescriptionObject); var upgradeDurationInMilliseconds = default(string); var upgradeDomainDurationInMilliseconds = default(string); var unhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>); var currentUpgradeDomainProgress = default(CurrentUpgradeDomainProgressInfo); var currentUpgradeUnitsProgress = default(CurrentUpgradeUnitsProgressInfo); var startTimestampUtc = default(string); var failureTimestampUtc = default(string); var failureReason = default(FailureReason?); var upgradeDomainProgressAtFailure = default(FailedUpgradeDomainProgressObject); var isNodeByNode = default(bool?); do { var propName = reader.ReadPropertyName(); if (string.Compare("CodeVersion", propName, StringComparison.OrdinalIgnoreCase) == 0) { codeVersion = reader.ReadValueAsString(); } else if (string.Compare("ConfigVersion", propName, StringComparison.OrdinalIgnoreCase) == 0) { configVersion = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDomains", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeDomains = reader.ReadList(UpgradeDomainInfoConverter.Deserialize); } else if (string.Compare("UpgradeUnits", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeUnits = reader.ReadList(UpgradeUnitInfoConverter.Deserialize); } else if (string.Compare("UpgradeState", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeState = UpgradeStateConverter.Deserialize(reader); } else if (string.Compare("NextUpgradeDomain", propName, StringComparison.OrdinalIgnoreCase) == 0) { nextUpgradeDomain = reader.ReadValueAsString(); } else if (string.Compare("RollingUpgradeMode", propName, StringComparison.OrdinalIgnoreCase) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("UpgradeDescription", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeDescription = ClusterUpgradeDescriptionObjectConverter.Deserialize(reader); } else if (string.Compare("UpgradeDurationInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeDurationInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDomainDurationInMilliseconds", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeDomainDurationInMilliseconds = reader.ReadValueAsString(); } else if (string.Compare("UnhealthyEvaluations", propName, StringComparison.OrdinalIgnoreCase) == 0) { unhealthyEvaluations = reader.ReadList(HealthEvaluationWrapperConverter.Deserialize); } else if (string.Compare("CurrentUpgradeDomainProgress", propName, StringComparison.OrdinalIgnoreCase) == 0) { currentUpgradeDomainProgress = CurrentUpgradeDomainProgressInfoConverter.Deserialize(reader); } else if (string.Compare("CurrentUpgradeUnitsProgress", propName, StringComparison.OrdinalIgnoreCase) == 0) { currentUpgradeUnitsProgress = CurrentUpgradeUnitsProgressInfoConverter.Deserialize(reader); } else if (string.Compare("StartTimestampUtc", propName, StringComparison.OrdinalIgnoreCase) == 0) { startTimestampUtc = reader.ReadValueAsString(); } else if (string.Compare("FailureTimestampUtc", propName, StringComparison.OrdinalIgnoreCase) == 0) { failureTimestampUtc = reader.ReadValueAsString(); } else if (string.Compare("FailureReason", propName, StringComparison.OrdinalIgnoreCase) == 0) { failureReason = FailureReasonConverter.Deserialize(reader); } else if (string.Compare("UpgradeDomainProgressAtFailure", propName, StringComparison.OrdinalIgnoreCase) == 0) { upgradeDomainProgressAtFailure = FailedUpgradeDomainProgressObjectConverter.Deserialize(reader); } else if (string.Compare("IsNodeByNode", propName, StringComparison.OrdinalIgnoreCase) == 0) { isNodeByNode = reader.ReadValueAsBool(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ClusterUpgradeProgressObject( codeVersion: codeVersion, configVersion: configVersion, upgradeDomains: upgradeDomains, upgradeUnits: upgradeUnits, upgradeState: upgradeState, nextUpgradeDomain: nextUpgradeDomain, rollingUpgradeMode: rollingUpgradeMode, upgradeDescription: upgradeDescription, upgradeDurationInMilliseconds: upgradeDurationInMilliseconds, upgradeDomainDurationInMilliseconds: upgradeDomainDurationInMilliseconds, unhealthyEvaluations: unhealthyEvaluations, currentUpgradeDomainProgress: currentUpgradeDomainProgress, currentUpgradeUnitsProgress: currentUpgradeUnitsProgress, startTimestampUtc: startTimestampUtc, failureTimestampUtc: failureTimestampUtc, failureReason: failureReason, upgradeDomainProgressAtFailure: upgradeDomainProgressAtFailure, isNodeByNode: isNodeByNode)); }
/// <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 ComposeDeploymentUpgradeProgressInfo GetFromJsonProperties(JsonReader reader) { var deploymentName = default(string); var applicationName = default(string); var upgradeState = default(ComposeDeploymentUpgradeState?); var upgradeStatusDetails = default(string); var upgradeKind = default(UpgradeKind?); var rollingUpgradeMode = default(UpgradeMode?); var forceRestart = default(bool?); var upgradeReplicaSetCheckTimeoutInSeconds = default(long?); var monitoringPolicy = default(MonitoringPolicyDescription); var applicationHealthPolicy = default(ApplicationHealthPolicy); var targetApplicationTypeVersion = default(string); var upgradeDuration = default(string); var currentUpgradeDomainDuration = default(string); var applicationUnhealthyEvaluations = default(IEnumerable <HealthEvaluationWrapper>); var currentUpgradeDomainProgress = default(CurrentUpgradeDomainProgressInfo); var startTimestampUtc = default(string); var failureTimestampUtc = default(string); var failureReason = default(FailureReason?); var upgradeDomainProgressAtFailure = default(FailureUpgradeDomainProgressInfo); var applicationUpgradeStatusDetails = default(string); do { var propName = reader.ReadPropertyName(); if (string.Compare("DeploymentName", propName, StringComparison.Ordinal) == 0) { deploymentName = reader.ReadValueAsString(); } else if (string.Compare("ApplicationName", propName, StringComparison.Ordinal) == 0) { applicationName = reader.ReadValueAsString(); } else if (string.Compare("UpgradeState", propName, StringComparison.Ordinal) == 0) { upgradeState = ComposeDeploymentUpgradeStateConverter.Deserialize(reader); } else if (string.Compare("UpgradeStatusDetails", propName, StringComparison.Ordinal) == 0) { upgradeStatusDetails = reader.ReadValueAsString(); } else if (string.Compare("UpgradeKind", propName, StringComparison.Ordinal) == 0) { upgradeKind = UpgradeKindConverter.Deserialize(reader); } else if (string.Compare("RollingUpgradeMode", propName, StringComparison.Ordinal) == 0) { rollingUpgradeMode = UpgradeModeConverter.Deserialize(reader); } else if (string.Compare("ForceRestart", propName, StringComparison.Ordinal) == 0) { forceRestart = reader.ReadValueAsBool(); } else if (string.Compare("UpgradeReplicaSetCheckTimeoutInSeconds", propName, StringComparison.Ordinal) == 0) { upgradeReplicaSetCheckTimeoutInSeconds = reader.ReadValueAsLong(); } else if (string.Compare("MonitoringPolicy", propName, StringComparison.Ordinal) == 0) { monitoringPolicy = MonitoringPolicyDescriptionConverter.Deserialize(reader); } else if (string.Compare("ApplicationHealthPolicy", propName, StringComparison.Ordinal) == 0) { applicationHealthPolicy = ApplicationHealthPolicyConverter.Deserialize(reader); } else if (string.Compare("TargetApplicationTypeVersion", propName, StringComparison.Ordinal) == 0) { targetApplicationTypeVersion = reader.ReadValueAsString(); } else if (string.Compare("UpgradeDuration", propName, StringComparison.Ordinal) == 0) { upgradeDuration = reader.ReadValueAsString(); } else if (string.Compare("CurrentUpgradeDomainDuration", propName, StringComparison.Ordinal) == 0) { currentUpgradeDomainDuration = reader.ReadValueAsString(); } else if (string.Compare("ApplicationUnhealthyEvaluations", propName, StringComparison.Ordinal) == 0) { applicationUnhealthyEvaluations = reader.ReadList(HealthEvaluationWrapperConverter.Deserialize); } else if (string.Compare("CurrentUpgradeDomainProgress", propName, StringComparison.Ordinal) == 0) { currentUpgradeDomainProgress = CurrentUpgradeDomainProgressInfoConverter.Deserialize(reader); } else if (string.Compare("StartTimestampUtc", propName, StringComparison.Ordinal) == 0) { startTimestampUtc = reader.ReadValueAsString(); } else if (string.Compare("FailureTimestampUtc", propName, StringComparison.Ordinal) == 0) { failureTimestampUtc = reader.ReadValueAsString(); } else if (string.Compare("FailureReason", propName, StringComparison.Ordinal) == 0) { failureReason = FailureReasonConverter.Deserialize(reader); } else if (string.Compare("UpgradeDomainProgressAtFailure", propName, StringComparison.Ordinal) == 0) { upgradeDomainProgressAtFailure = FailureUpgradeDomainProgressInfoConverter.Deserialize(reader); } else if (string.Compare("ApplicationUpgradeStatusDetails", propName, StringComparison.Ordinal) == 0) { applicationUpgradeStatusDetails = reader.ReadValueAsString(); } else { reader.SkipPropertyValue(); } }while (reader.TokenType != JsonToken.EndObject); return(new ComposeDeploymentUpgradeProgressInfo( deploymentName: deploymentName, applicationName: applicationName, upgradeState: upgradeState, upgradeStatusDetails: upgradeStatusDetails, upgradeKind: upgradeKind, rollingUpgradeMode: rollingUpgradeMode, forceRestart: forceRestart, upgradeReplicaSetCheckTimeoutInSeconds: upgradeReplicaSetCheckTimeoutInSeconds, monitoringPolicy: monitoringPolicy, applicationHealthPolicy: applicationHealthPolicy, targetApplicationTypeVersion: targetApplicationTypeVersion, upgradeDuration: upgradeDuration, currentUpgradeDomainDuration: currentUpgradeDomainDuration, applicationUnhealthyEvaluations: applicationUnhealthyEvaluations, currentUpgradeDomainProgress: currentUpgradeDomainProgress, startTimestampUtc: startTimestampUtc, failureTimestampUtc: failureTimestampUtc, failureReason: failureReason, upgradeDomainProgressAtFailure: upgradeDomainProgressAtFailure, applicationUpgradeStatusDetails: applicationUpgradeStatusDetails)); }