internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity(JsonElement element) { Optional <LinkedServiceReference> linkedServiceName = default; Optional <ActivityPolicy> policy = default; string name = default; string type = default; Optional <string> description = default; Optional <IList <ActivityDependency> > dependsOn = default; Optional <IList <UserProperty> > userProperties = default; SsisPackageLocation packageLocation = default; Optional <object> runtime = default; Optional <object> loggingLevel = default; Optional <object> environmentPath = default; Optional <SsisExecutionCredential> executionCredential = default; IntegrationRuntimeReference connectVia = default; Optional <IDictionary <string, SsisExecutionParameter> > projectParameters = default; Optional <IDictionary <string, SsisExecutionParameter> > packageParameters = default; Optional <IDictionary <string, IDictionary <string, SsisExecutionParameter> > > projectConnectionManagers = default; Optional <IDictionary <string, IDictionary <string, SsisExecutionParameter> > > packageConnectionManagers = default; Optional <IDictionary <string, SsisPropertyOverride> > propertyOverrides = default; Optional <SsisLogLocation> logLocation = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = new Dictionary <string, object>(); foreach (var property in element.EnumerateObject()) { if (property.NameEquals("linkedServiceName")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); continue; } if (property.NameEquals("policy")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("description")) { description = property.Value.GetString(); continue; } if (property.NameEquals("dependsOn")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <ActivityDependency> array = new List <ActivityDependency>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(ActivityDependency.DeserializeActivityDependency(item)); } dependsOn = array; continue; } if (property.NameEquals("userProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } List <UserProperty> array = new List <UserProperty>(); foreach (var item in property.Value.EnumerateArray()) { array.Add(UserProperty.DeserializeUserProperty(item)); } userProperties = array; continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("packageLocation")) { packageLocation = SsisPackageLocation.DeserializeSsisPackageLocation(property0.Value); continue; } if (property0.NameEquals("runtime")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } runtime = property0.Value.GetObject(); continue; } if (property0.NameEquals("loggingLevel")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } loggingLevel = property0.Value.GetObject(); continue; } if (property0.NameEquals("environmentPath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } environmentPath = property0.Value.GetObject(); continue; } if (property0.NameEquals("executionCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } executionCredential = SsisExecutionCredential.DeserializeSsisExecutionCredential(property0.Value); continue; } if (property0.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); continue; } if (property0.NameEquals("projectParameters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, SsisExecutionParameter> dictionary = new Dictionary <string, SsisExecutionParameter>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); } projectParameters = dictionary; continue; } if (property0.NameEquals("packageParameters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, SsisExecutionParameter> dictionary = new Dictionary <string, SsisExecutionParameter>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); } packageParameters = dictionary; continue; } if (property0.NameEquals("projectConnectionManagers")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, IDictionary <string, SsisExecutionParameter> > dictionary = new Dictionary <string, IDictionary <string, SsisExecutionParameter> >(); foreach (var property1 in property0.Value.EnumerateObject()) { Dictionary <string, SsisExecutionParameter> dictionary0 = new Dictionary <string, SsisExecutionParameter>(); foreach (var property2 in property1.Value.EnumerateObject()) { dictionary0.Add(property2.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property2.Value)); } dictionary.Add(property1.Name, dictionary0); } projectConnectionManagers = dictionary; continue; } if (property0.NameEquals("packageConnectionManagers")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, IDictionary <string, SsisExecutionParameter> > dictionary = new Dictionary <string, IDictionary <string, SsisExecutionParameter> >(); foreach (var property1 in property0.Value.EnumerateObject()) { Dictionary <string, SsisExecutionParameter> dictionary0 = new Dictionary <string, SsisExecutionParameter>(); foreach (var property2 in property1.Value.EnumerateObject()) { dictionary0.Add(property2.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property2.Value)); } dictionary.Add(property1.Name, dictionary0); } packageConnectionManagers = dictionary; continue; } if (property0.NameEquals("propertyOverrides")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, SsisPropertyOverride> dictionary = new Dictionary <string, SsisPropertyOverride>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, SsisPropertyOverride.DeserializeSsisPropertyOverride(property1.Value)); } propertyOverrides = dictionary; continue; } if (property0.NameEquals("logLocation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } logLocation = SsisLogLocation.DeserializeSsisLogLocation(property0.Value); continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new ExecuteSsisPackageActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, packageLocation, runtime.Value, loggingLevel.Value, environmentPath.Value, executionCredential.Value, connectVia, Optional.ToDictionary(projectParameters), Optional.ToDictionary(packageParameters), Optional.ToDictionary(projectConnectionManagers), Optional.ToDictionary(packageConnectionManagers), Optional.ToDictionary(propertyOverrides), logLocation.Value)); }
internal static ExecuteSsisPackageActivity DeserializeExecuteSsisPackageActivity(JsonElement element) { LinkedServiceReference linkedServiceName = default; ActivityPolicy policy = default; string name = default; string type = default; string description = default; IList <ActivityDependency> dependsOn = default; IList <UserProperty> userProperties = default; SsisPackageLocation packageLocation = default; object runtime = default; object loggingLevel = default; object environmentPath = default; SsisExecutionCredential executionCredential = default; IntegrationRuntimeReference connectVia = default; IDictionary <string, SsisExecutionParameter> projectParameters = default; IDictionary <string, SsisExecutionParameter> packageParameters = default; IDictionary <string, object> projectConnectionManagers = default; IDictionary <string, object> packageConnectionManagers = default; IDictionary <string, SsisPropertyOverride> propertyOverrides = default; SsisLogLocation logLocation = default; IDictionary <string, object> additionalProperties = default; Dictionary <string, object> additionalPropertiesDictionary = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("linkedServiceName")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value); continue; } if (property.NameEquals("policy")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } policy = ActivityPolicy.DeserializeActivityPolicy(property.Value); continue; } if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("description")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } description = property.Value.GetString(); continue; } if (property.NameEquals("dependsOn")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <ActivityDependency> array = new List <ActivityDependency>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(ActivityDependency.DeserializeActivityDependency(item)); } } dependsOn = array; continue; } if (property.NameEquals("userProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { continue; } List <UserProperty> array = new List <UserProperty>(); foreach (var item in property.Value.EnumerateArray()) { if (item.ValueKind == JsonValueKind.Null) { array.Add(null); } else { array.Add(UserProperty.DeserializeUserProperty(item)); } } userProperties = array; continue; } if (property.NameEquals("typeProperties")) { foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("packageLocation")) { packageLocation = SsisPackageLocation.DeserializeSsisPackageLocation(property0.Value); continue; } if (property0.NameEquals("runtime")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } runtime = property0.Value.GetObject(); continue; } if (property0.NameEquals("loggingLevel")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } loggingLevel = property0.Value.GetObject(); continue; } if (property0.NameEquals("environmentPath")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } environmentPath = property0.Value.GetObject(); continue; } if (property0.NameEquals("executionCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } executionCredential = SsisExecutionCredential.DeserializeSsisExecutionCredential(property0.Value); continue; } if (property0.NameEquals("connectVia")) { connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value); continue; } if (property0.NameEquals("projectParameters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, SsisExecutionParameter> dictionary = new Dictionary <string, SsisExecutionParameter>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); } } projectParameters = dictionary; continue; } if (property0.NameEquals("packageParameters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, SsisExecutionParameter> dictionary = new Dictionary <string, SsisExecutionParameter>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, SsisExecutionParameter.DeserializeSsisExecutionParameter(property1.Value)); } } packageParameters = dictionary; continue; } if (property0.NameEquals("projectConnectionManagers")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, property1.Value.GetObject()); } } projectConnectionManagers = dictionary; continue; } if (property0.NameEquals("packageConnectionManagers")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, property1.Value.GetObject()); } } packageConnectionManagers = dictionary; continue; } if (property0.NameEquals("propertyOverrides")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, SsisPropertyOverride> dictionary = new Dictionary <string, SsisPropertyOverride>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, SsisPropertyOverride.DeserializeSsisPropertyOverride(property1.Value)); } } propertyOverrides = dictionary; continue; } if (property0.NameEquals("logLocation")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } logLocation = SsisLogLocation.DeserializeSsisLogLocation(property0.Value); continue; } } continue; } additionalPropertiesDictionary ??= new Dictionary <string, object>(); if (property.Value.ValueKind == JsonValueKind.Null) { additionalPropertiesDictionary.Add(property.Name, null); } else { additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } } additionalProperties = additionalPropertiesDictionary; return(new ExecuteSsisPackageActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, packageLocation, runtime, loggingLevel, environmentPath, executionCredential, connectVia, projectParameters, packageParameters, projectConnectionManagers, packageConnectionManagers, propertyOverrides, logLocation)); }