internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionActivity(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; Optional <IDictionary <string, object> > globalParameters = default; Optional <IDictionary <string, AzureMLWebServiceFile> > webServiceOutputs = default; Optional <IDictionary <string, AzureMLWebServiceFile> > webServiceInputs = 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("globalParameters")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, object> dictionary = new Dictionary <string, object>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, property1.Value.GetObject()); } globalParameters = dictionary; continue; } if (property0.NameEquals("webServiceOutputs")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, AzureMLWebServiceFile> dictionary = new Dictionary <string, AzureMLWebServiceFile>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); } webServiceOutputs = dictionary; continue; } if (property0.NameEquals("webServiceInputs")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } Dictionary <string, AzureMLWebServiceFile> dictionary = new Dictionary <string, AzureMLWebServiceFile>(); foreach (var property1 in property0.Value.EnumerateObject()) { dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); } webServiceInputs = dictionary; continue; } } continue; } additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject()); } additionalProperties = additionalPropertiesDictionary; return(new AzureMLBatchExecutionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToDictionary(globalParameters), Optional.ToDictionary(webServiceOutputs), Optional.ToDictionary(webServiceInputs))); }
internal static AzureMLBatchExecutionActivity DeserializeAzureMLBatchExecutionActivity(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; IDictionary <string, object> globalParameters = default; IDictionary <string, AzureMLWebServiceFile> webServiceOutputs = default; IDictionary <string, AzureMLWebServiceFile> webServiceInputs = 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("globalParameters")) { 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()); } } globalParameters = dictionary; continue; } if (property0.NameEquals("webServiceOutputs")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, AzureMLWebServiceFile> dictionary = new Dictionary <string, AzureMLWebServiceFile>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); } } webServiceOutputs = dictionary; continue; } if (property0.NameEquals("webServiceInputs")) { if (property0.Value.ValueKind == JsonValueKind.Null) { continue; } Dictionary <string, AzureMLWebServiceFile> dictionary = new Dictionary <string, AzureMLWebServiceFile>(); foreach (var property1 in property0.Value.EnumerateObject()) { if (property1.Value.ValueKind == JsonValueKind.Null) { dictionary.Add(property1.Name, null); } else { dictionary.Add(property1.Name, AzureMLWebServiceFile.DeserializeAzureMLWebServiceFile(property1.Value)); } } webServiceInputs = dictionary; 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 AzureMLBatchExecutionActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, globalParameters, webServiceOutputs, webServiceInputs)); }