コード例 #1
0
        internal static DatabricksSparkJarActivity DeserializeDatabricksSparkJarActivity(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;
            object         mainClassName = default;
            IList <object> parameters    = default;
            IList <IDictionary <string, object> > libraries                      = 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("mainClassName"))
                        {
                            mainClassName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("parameters"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(item.GetObject());
                                }
                            }
                            parameters = array;
                            continue;
                        }
                        if (property0.NameEquals("libraries"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <IDictionary <string, object> > array = new List <IDictionary <string, object> >();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    Dictionary <string, object> dictionary = new Dictionary <string, object>();
                                    foreach (var property1 in item.EnumerateObject())
                                    {
                                        if (property1.Value.ValueKind == JsonValueKind.Null)
                                        {
                                            dictionary.Add(property1.Name, null);
                                        }
                                        else
                                        {
                                            dictionary.Add(property1.Name, property1.Value.GetObject());
                                        }
                                    }
                                    array.Add(dictionary);
                                }
                            }
                            libraries = array;
                            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 DatabricksSparkJarActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, mainClassName, parameters, libraries));
        }
コード例 #2
0
        internal static SapHanaTableDataset DeserializeSapHanaTableDataset(JsonElement element)
        {
            string type        = default;
            string description = default;
            object structure   = default;
            object schema      = default;
            LinkedServiceReference linkedServiceName = default;
            IDictionary <string, ParameterSpecification> parameters = default;
            IList <object> annotations = default;
            DatasetFolder  folder      = default;
            object         schema0     = default;
            object         table       = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = default;

            foreach (var property in element.EnumerateObject())
            {
                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("structure"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.Value.ValueKind == JsonValueKind.Null)
                        {
                            dictionary.Add(property0.Name, null);
                        }
                        else
                        {
                            dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                        }
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        if (item.ValueKind == JsonValueKind.Null)
                        {
                            array.Add(null);
                        }
                        else
                        {
                            array.Add(item.GetObject());
                        }
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        continue;
                    }
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("schema"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            schema0 = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("table"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            table = property0.Value.GetObject();
                            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 SapHanaTableDataset(type, description, structure, schema, linkedServiceName, parameters, annotations, folder, additionalProperties, schema0, table));
        }
        internal static GetMetadataActivity DeserializeGetMetadataActivity(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;
            DatasetReference              dataset                        = default;
            Optional <IList <object> >    fieldList                      = default;
            Optional <StoreReadSettings>  storeSettings                  = default;
            Optional <FormatReadSettings> formatSettings                 = 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("dataset"))
                        {
                            dataset = DatasetReference.DeserializeDatasetReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("fieldList"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetObject());
                            }
                            fieldList = array;
                            continue;
                        }
                        if (property0.NameEquals("storeSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("formatSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            formatSettings = FormatReadSettings.DeserializeFormatReadSettings(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new GetMetadataActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, dataset, Optional.ToList(fieldList), storeSettings.Value, formatSettings.Value));
        }
        internal static HDInsightHiveActivity DeserializeHDInsightHiveActivity(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;
            IList <LinkedServiceReference> storageLinkedServices = default;
            IList <object> arguments = default;
            HDInsightActivityDebugInfoOption?getDebugInfo = default;
            object scriptPath = default;
            LinkedServiceReference       scriptLinkedService = default;
            IDictionary <string, object> defines             = default;
            IList <object> variables    = default;
            int?           queryTimeout = 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("storageLinkedServices"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <LinkedServiceReference> array = new List <LinkedServiceReference>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
                                }
                            }
                            storageLinkedServices = array;
                            continue;
                        }
                        if (property0.NameEquals("arguments"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(item.GetObject());
                                }
                            }
                            arguments = array;
                            continue;
                        }
                        if (property0.NameEquals("getDebugInfo"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("scriptPath"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            scriptPath = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("scriptLinkedService"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            scriptLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("defines"))
                        {
                            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());
                                }
                            }
                            defines = dictionary;
                            continue;
                        }
                        if (property0.NameEquals("variables"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                if (item.ValueKind == JsonValueKind.Null)
                                {
                                    array.Add(null);
                                }
                                else
                                {
                                    array.Add(item.GetObject());
                                }
                            }
                            variables = array;
                            continue;
                        }
                        if (property0.NameEquals("queryTimeout"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            queryTimeout = property0.Value.GetInt32();
                            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 HDInsightHiveActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, storageLinkedServices, arguments, getDebugInfo, scriptPath, scriptLinkedService, defines, variables, queryTimeout));
        }
コード例 #5
0
        internal static NetezzaTableDataset DeserializeNetezzaTableDataset(JsonElement element)
        {
            string                 type              = default;
            Optional <string>      description       = default;
            Optional <object>      structure         = default;
            Optional <object>      schema            = default;
            LinkedServiceReference linkedServiceName = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> >   annotations                    = default;
            Optional <DatasetFolder>     folder                         = default;
            Optional <object>            tableName                      = default;
            Optional <object>            table                          = default;
            Optional <object>            schema0                        = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("structure"))
                {
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("tableName"))
                        {
                            tableName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("table"))
                        {
                            table = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("schema"))
                        {
                            schema0 = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary ??= new Dictionary <string, object>();
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new NetezzaTableDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, tableName.Value, table.Value, schema0.Value));
        }
コード例 #6
0
        internal static SynapseNotebookActivity DeserializeSynapseNotebookActivity(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;
            SynapseNotebookReference notebook = default;
            Optional <IDictionary <string, object> > parameters           = 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("notebook"))
                        {
                            notebook = SynapseNotebookReference.DeserializeSynapseNotebookReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("parameters"))
                        {
                            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());
                            }
                            parameters = dictionary;
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new SynapseNotebookActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, notebook, Optional.ToDictionary(parameters)));
        }
        internal static AzureMLExecutePipelineActivity DeserializeAzureMLExecutePipelineActivity(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;
            object                       mlPipelineId                   = default;
            Optional <object>            experimentName                 = default;
            Optional <object>            mlPipelineParameters           = default;
            Optional <object>            mlParentRunId                  = default;
            Optional <object>            continueOnStepFailure          = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("mlPipelineId"))
                        {
                            mlPipelineId = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("experimentName"))
                        {
                            experimentName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("mlPipelineParameters"))
                        {
                            mlPipelineParameters = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("mlParentRunId"))
                        {
                            mlParentRunId = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("continueOnStepFailure"))
                        {
                            continueOnStepFailure = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary ??= new Dictionary <string, object>();
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new AzureMLExecutePipelineActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, mlPipelineId, experimentName.Value, mlPipelineParameters.Value, mlParentRunId.Value, continueOnStepFailure.Value));
        }
コード例 #8
0
        internal static BlobTrigger DeserializeBlobTrigger(JsonElement element)
        {
            Optional <IList <TriggerPipelineReference> > pipelines = default;
            string            type        = default;
            Optional <string> description = default;
            Optional <TriggerRuntimeState> runtimeState = default;
            Optional <IList <object> >     annotations  = default;
            string folderPath     = default;
            int    maxConcurrency = default;
            LinkedServiceReference       linkedService                  = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("pipelines"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <TriggerPipelineReference> array = new List <TriggerPipelineReference>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(TriggerPipelineReference.DeserializeTriggerPipelineReference(item));
                    }
                    pipelines = array;
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("runtimeState"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    runtimeState = new TriggerRuntimeState(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = 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("folderPath"))
                        {
                            folderPath = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("maxConcurrency"))
                        {
                            maxConcurrency = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("linkedService"))
                        {
                            linkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new BlobTrigger(type, description.Value, Optional.ToNullable(runtimeState), Optional.ToList(annotations), additionalProperties, Optional.ToList(pipelines), folderPath, maxConcurrency, linkedService));
        }
コード例 #9
0
        internal static SqlServerStoredProcedureActivity DeserializeSqlServerStoredProcedureActivity(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;
            object storedProcedureName = default;
            Optional <IDictionary <string, StoredProcedureParameter> > storedProcedureParameters = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("storedProcedureName"))
                        {
                            storedProcedureName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("storedProcedureParameters"))
                        {
                            Dictionary <string, StoredProcedureParameter> dictionary = new Dictionary <string, StoredProcedureParameter>();
                            foreach (var property1 in property0.Value.EnumerateObject())
                            {
                                dictionary.Add(property1.Name, StoredProcedureParameter.DeserializeStoredProcedureParameter(property1.Value));
                            }
                            storedProcedureParameters = dictionary;
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new SqlServerStoredProcedureActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, storedProcedureName, Optional.ToDictionary(storedProcedureParameters)));
        }
        internal static DelimitedTextDataset DeserializeDelimitedTextDataset(JsonElement element)
        {
            string                 type              = default;
            Optional <string>      description       = default;
            Optional <object>      structure         = default;
            Optional <object>      schema            = default;
            LinkedServiceReference linkedServiceName = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> > annotations     = default;
            Optional <DatasetFolder>   folder          = default;
            Optional <DatasetLocation> location        = default;
            Optional <object>          columnDelimiter = default;
            Optional <object>          rowDelimiter    = default;
            Optional <object>          encodingName    = default;
            Optional <DelimitedTextCompressionCodec> compressionCodec = default;
            Optional <DatasetCompressionLevel>       compressionLevel = default;
            Optional <object>            quoteChar                      = default;
            Optional <object>            escapeChar                     = default;
            Optional <object>            firstRowAsHeader               = default;
            Optional <object>            nullValue                      = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("structure"))
                {
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("location"))
                        {
                            location = DatasetLocation.DeserializeDatasetLocation(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("columnDelimiter"))
                        {
                            columnDelimiter = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("rowDelimiter"))
                        {
                            rowDelimiter = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("encodingName"))
                        {
                            encodingName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("compressionCodec"))
                        {
                            compressionCodec = new DelimitedTextCompressionCodec(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("compressionLevel"))
                        {
                            compressionLevel = new DatasetCompressionLevel(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("quoteChar"))
                        {
                            quoteChar = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("escapeChar"))
                        {
                            escapeChar = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("firstRowAsHeader"))
                        {
                            firstRowAsHeader = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("nullValue"))
                        {
                            nullValue = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new DelimitedTextDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, columnDelimiter.Value, rowDelimiter.Value, encodingName.Value, Optional.ToNullable(compressionCodec), Optional.ToNullable(compressionLevel), quoteChar.Value, escapeChar.Value, firstRowAsHeader.Value, nullValue.Value));
        }
コード例 #11
0
        internal static AvroDataset DeserializeAvroDataset(JsonElement element)
        {
            string                 type              = default;
            Optional <string>      description       = default;
            Optional <object>      structure         = default;
            Optional <object>      schema            = default;
            LinkedServiceReference linkedServiceName = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> >   annotations                    = default;
            Optional <DatasetFolder>     folder                         = default;
            Optional <DatasetLocation>   location                       = default;
            Optional <object>            avroCompressionCodec           = default;
            Optional <int>               avroCompressionLevel           = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("structure"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("location"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            location = DatasetLocation.DeserializeDatasetLocation(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("avroCompressionCodec"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            avroCompressionCodec = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("avroCompressionLevel"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            avroCompressionLevel = property0.Value.GetInt32();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new AvroDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, location.Value, avroCompressionCodec.Value, Optional.ToNullable(avroCompressionLevel)));
        }
コード例 #12
0
        internal static HDInsightSparkActivity DeserializeHDInsightSparkActivity(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;
            object rootPath      = default;
            object entryFilePath = default;
            Optional <IList <object> > arguments = default;
            Optional <HDInsightActivityDebugInfoOption> getDebugInfo          = default;
            Optional <LinkedServiceReference>           sparkJobLinkedService = default;
            Optional <string> className = default;
            Optional <object> proxyUser = default;
            Optional <IDictionary <string, object> > sparkConfig          = default;
            IDictionary <string, object>             additionalProperties = default;
            Dictionary <string, object> additionalPropertiesDictionary    = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("rootPath"))
                        {
                            rootPath = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("entryFilePath"))
                        {
                            entryFilePath = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("arguments"))
                        {
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetObject());
                            }
                            arguments = array;
                            continue;
                        }
                        if (property0.NameEquals("getDebugInfo"))
                        {
                            getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("sparkJobLinkedService"))
                        {
                            sparkJobLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("className"))
                        {
                            className = property0.Value.GetString();
                            continue;
                        }
                        if (property0.NameEquals("proxyUser"))
                        {
                            proxyUser = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("sparkConfig"))
                        {
                            Dictionary <string, object> dictionary = new Dictionary <string, object>();
                            foreach (var property1 in property0.Value.EnumerateObject())
                            {
                                dictionary.Add(property1.Name, property1.Value.GetObject());
                            }
                            sparkConfig = dictionary;
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary ??= new Dictionary <string, object>();
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new HDInsightSparkActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, rootPath, entryFilePath, Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), sparkJobLinkedService.Value, className.Value, proxyUser.Value, Optional.ToDictionary(sparkConfig)));
        }
        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, object> > projectConnectionManagers         = default;
            Optional <IDictionary <string, object> > 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, object> dictionary = new Dictionary <string, object>();
                            foreach (var property1 in property0.Value.EnumerateObject())
                            {
                                dictionary.Add(property1.Name, property1.Value.GetObject());
                            }
                            projectConnectionManagers = dictionary;
                            continue;
                        }
                        if (property0.NameEquals("packageConnectionManagers"))
                        {
                            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());
                            }
                            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 ExecuteDataFlowActivity DeserializeExecuteDataFlowActivity(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;
            DataFlowReference dataFlow = default;
            Optional <DataFlowStagingInfo>         staging                  = default;
            Optional <IntegrationRuntimeReference> integrationRuntime       = default;
            Optional <ExecuteDataFlowActivityTypePropertiesCompute> compute = 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("dataFlow"))
                        {
                            dataFlow = DataFlowReference.DeserializeDataFlowReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("staging"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            staging = DataFlowStagingInfo.DeserializeDataFlowStagingInfo(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("integrationRuntime"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            integrationRuntime = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("compute"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            compute = ExecuteDataFlowActivityTypePropertiesCompute.DeserializeExecuteDataFlowActivityTypePropertiesCompute(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new ExecuteDataFlowActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, dataFlow, staging.Value, integrationRuntime.Value, compute.Value));
        }
コード例 #15
0
        internal static HDInsightMapReduceActivity DeserializeHDInsightMapReduceActivity(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 <IList <LinkedServiceReference> > storageLinkedServices = default;
            Optional <IList <object> > arguments = default;
            Optional <HDInsightActivityDebugInfoOption> getDebugInfo = default;
            object className   = default;
            object jarFilePath = default;
            Optional <LinkedServiceReference>        jarLinkedService               = default;
            Optional <IList <object> >               jarLibs                        = default;
            Optional <IDictionary <string, object> > defines                        = default;
            IDictionary <string, object>             additionalProperties           = default;
            Dictionary <string, object>              additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("storageLinkedServices"))
                        {
                            List <LinkedServiceReference> array = new List <LinkedServiceReference>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
                            }
                            storageLinkedServices = array;
                            continue;
                        }
                        if (property0.NameEquals("arguments"))
                        {
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetObject());
                            }
                            arguments = array;
                            continue;
                        }
                        if (property0.NameEquals("getDebugInfo"))
                        {
                            getDebugInfo = new HDInsightActivityDebugInfoOption(property0.Value.GetString());
                            continue;
                        }
                        if (property0.NameEquals("className"))
                        {
                            className = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("jarFilePath"))
                        {
                            jarFilePath = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("jarLinkedService"))
                        {
                            jarLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("jarLibs"))
                        {
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetObject());
                            }
                            jarLibs = array;
                            continue;
                        }
                        if (property0.NameEquals("defines"))
                        {
                            Dictionary <string, object> dictionary = new Dictionary <string, object>();
                            foreach (var property1 in property0.Value.EnumerateObject())
                            {
                                dictionary.Add(property1.Name, property1.Value.GetObject());
                            }
                            defines = dictionary;
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new HDInsightMapReduceActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(storageLinkedServices), Optional.ToList(arguments), Optional.ToNullable(getDebugInfo), className, jarFilePath, jarLinkedService.Value, Optional.ToList(jarLibs), Optional.ToDictionary(defines)));
        }
コード例 #16
0
        internal static ExecutionActivity DeserializeExecutionActivity(JsonElement element)
        {
            if (element.TryGetProperty("type", out JsonElement discriminator))
            {
                switch (discriminator.GetString())
                {
                case "AzureDataExplorerCommand": return(AzureDataExplorerCommandActivity.DeserializeAzureDataExplorerCommandActivity(element));

                case "AzureFunctionActivity": return(AzureFunctionActivity.DeserializeAzureFunctionActivity(element));

                case "AzureMLBatchExecution": return(AzureMLBatchExecutionActivity.DeserializeAzureMLBatchExecutionActivity(element));

                case "AzureMLExecutePipeline": return(AzureMLExecutePipelineActivity.DeserializeAzureMLExecutePipelineActivity(element));

                case "AzureMLUpdateResource": return(AzureMLUpdateResourceActivity.DeserializeAzureMLUpdateResourceActivity(element));

                case "Copy": return(CopyActivity.DeserializeCopyActivity(element));

                case "Custom": return(CustomActivity.DeserializeCustomActivity(element));

                case "DataLakeAnalyticsU-SQL": return(DataLakeAnalyticsUsqlActivity.DeserializeDataLakeAnalyticsUsqlActivity(element));

                case "DatabricksNotebook": return(DatabricksNotebookActivity.DeserializeDatabricksNotebookActivity(element));

                case "DatabricksSparkJar": return(DatabricksSparkJarActivity.DeserializeDatabricksSparkJarActivity(element));

                case "DatabricksSparkPython": return(DatabricksSparkPythonActivity.DeserializeDatabricksSparkPythonActivity(element));

                case "Delete": return(DeleteActivity.DeserializeDeleteActivity(element));

                case "ExecuteDataFlow": return(ExecuteDataFlowActivity.DeserializeExecuteDataFlowActivity(element));

                case "ExecuteSSISPackage": return(ExecuteSsisPackageActivity.DeserializeExecuteSsisPackageActivity(element));

                case "GetMetadata": return(GetMetadataActivity.DeserializeGetMetadataActivity(element));

                case "HDInsightHive": return(HDInsightHiveActivity.DeserializeHDInsightHiveActivity(element));

                case "HDInsightMapReduce": return(HDInsightMapReduceActivity.DeserializeHDInsightMapReduceActivity(element));

                case "HDInsightPig": return(HDInsightPigActivity.DeserializeHDInsightPigActivity(element));

                case "HDInsightSpark": return(HDInsightSparkActivity.DeserializeHDInsightSparkActivity(element));

                case "HDInsightStreaming": return(HDInsightStreamingActivity.DeserializeHDInsightStreamingActivity(element));

                case "Lookup": return(LookupActivity.DeserializeLookupActivity(element));

                case "SqlServerStoredProcedure": return(SqlServerStoredProcedureActivity.DeserializeSqlServerStoredProcedureActivity(element));

                case "WebActivity": return(WebActivity.DeserializeWebActivity(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;
            IDictionary <string, object>           additionalProperties           = default;
            Dictionary <string, object>            additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    List <UserProperty> array = new List <UserProperty>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(UserProperty.DeserializeUserProperty(item));
                    }
                    userProperties = array;
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new ExecutionActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value));
        }
        internal static HDInsightOnDemandLinkedService DeserializeHDInsightOnDemandLinkedService(JsonElement element)
        {
            string type = default;
            Optional <IntegrationRuntimeReference> connectVia = default;
            Optional <string> description = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> > annotations = default;
            object clusterSize = default;
            object timeToLive  = default;
            object version     = default;
            LinkedServiceReference linkedServiceName  = default;
            object                hostSubscriptionId  = default;
            Optional <object>     servicePrincipalId  = default;
            Optional <SecretBase> servicePrincipalKey = default;
            object                tenant = default;
            object                clusterResourceGroup = default;
            Optional <object>     clusterNamePrefix    = default;
            Optional <object>     clusterUserName      = default;
            Optional <SecretBase> clusterPassword      = default;
            Optional <object>     clusterSshUserName   = default;
            Optional <SecretBase> clusterSshPassword   = default;
            Optional <IList <LinkedServiceReference> > additionalLinkedServiceNames = default;
            Optional <LinkedServiceReference>          hcatalogLinkedServiceName    = default;
            Optional <object> clusterType                               = default;
            Optional <object> sparkVersion                              = default;
            Optional <object> coreConfiguration                         = default;
            Optional <object> hBaseConfiguration                        = default;
            Optional <object> hdfsConfiguration                         = default;
            Optional <object> hiveConfiguration                         = default;
            Optional <object> mapReduceConfiguration                    = default;
            Optional <object> oozieConfiguration                        = default;
            Optional <object> stormConfiguration                        = default;
            Optional <object> yarnConfiguration                         = default;
            Optional <object> encryptedCredential                       = default;
            Optional <object> headNodeSize                              = default;
            Optional <object> dataNodeSize                              = default;
            Optional <object> zookeeperNodeSize                         = default;
            Optional <IList <ScriptAction> > scriptActions              = default;
            Optional <object>            virtualNetworkId               = default;
            Optional <object>            subnetName                     = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("connectVia"))
                {
                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("clusterSize"))
                        {
                            clusterSize = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("timeToLive"))
                        {
                            timeToLive = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("version"))
                        {
                            version = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("linkedServiceName"))
                        {
                            linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("hostSubscriptionId"))
                        {
                            hostSubscriptionId = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("servicePrincipalId"))
                        {
                            servicePrincipalId = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("servicePrincipalKey"))
                        {
                            servicePrincipalKey = SecretBase.DeserializeSecretBase(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("tenant"))
                        {
                            tenant = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("clusterResourceGroup"))
                        {
                            clusterResourceGroup = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("clusterNamePrefix"))
                        {
                            clusterNamePrefix = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("clusterUserName"))
                        {
                            clusterUserName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("clusterPassword"))
                        {
                            clusterPassword = SecretBase.DeserializeSecretBase(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("clusterSshUserName"))
                        {
                            clusterSshUserName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("clusterSshPassword"))
                        {
                            clusterSshPassword = SecretBase.DeserializeSecretBase(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("additionalLinkedServiceNames"))
                        {
                            List <LinkedServiceReference> array = new List <LinkedServiceReference>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
                            }
                            additionalLinkedServiceNames = array;
                            continue;
                        }
                        if (property0.NameEquals("hcatalogLinkedServiceName"))
                        {
                            hcatalogLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("clusterType"))
                        {
                            clusterType = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("sparkVersion"))
                        {
                            sparkVersion = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("coreConfiguration"))
                        {
                            coreConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("hBaseConfiguration"))
                        {
                            hBaseConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("hdfsConfiguration"))
                        {
                            hdfsConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("hiveConfiguration"))
                        {
                            hiveConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("mapReduceConfiguration"))
                        {
                            mapReduceConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("oozieConfiguration"))
                        {
                            oozieConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("stormConfiguration"))
                        {
                            stormConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("yarnConfiguration"))
                        {
                            yarnConfiguration = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("encryptedCredential"))
                        {
                            encryptedCredential = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("headNodeSize"))
                        {
                            headNodeSize = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("dataNodeSize"))
                        {
                            dataNodeSize = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("zookeeperNodeSize"))
                        {
                            zookeeperNodeSize = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("scriptActions"))
                        {
                            List <ScriptAction> array = new List <ScriptAction>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(ScriptAction.DeserializeScriptAction(item));
                            }
                            scriptActions = array;
                            continue;
                        }
                        if (property0.NameEquals("virtualNetworkId"))
                        {
                            virtualNetworkId = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("subnetName"))
                        {
                            subnetName = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary ??= new Dictionary <string, object>();
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new HDInsightOnDemandLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clusterSize, timeToLive, version, linkedServiceName, hostSubscriptionId, servicePrincipalId.Value, servicePrincipalKey.Value, tenant, clusterResourceGroup, clusterNamePrefix.Value, clusterUserName.Value, clusterPassword.Value, clusterSshUserName.Value, clusterSshPassword.Value, Optional.ToList(additionalLinkedServiceNames), hcatalogLinkedServiceName.Value, clusterType.Value, sparkVersion.Value, coreConfiguration.Value, hBaseConfiguration.Value, hdfsConfiguration.Value, hiveConfiguration.Value, mapReduceConfiguration.Value, oozieConfiguration.Value, stormConfiguration.Value, yarnConfiguration.Value, encryptedCredential.Value, headNodeSize.Value, dataNodeSize.Value, zookeeperNodeSize.Value, Optional.ToList(scriptActions), virtualNetworkId.Value, subnetName.Value));
        }
コード例 #18
0
        internal static LookupActivity DeserializeLookupActivity(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;
            CopySource                   source                         = default;
            DatasetReference             dataset                        = default;
            object                       firstRowOnly                   = 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("source"))
                        {
                            source = CopySource.DeserializeCopySource(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("dataset"))
                        {
                            dataset = DatasetReference.DeserializeDatasetReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("firstRowOnly"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                continue;
                            }
                            firstRowOnly = property0.Value.GetObject();
                            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 LookupActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, source, dataset, firstRowOnly));
        }
        internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceActivity(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;
            object trainedModelName = default;
            LinkedServiceReference trainedModelLinkedServiceName = default;
            object trainedModelFilePath = 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("trainedModelName"))
                        {
                            trainedModelName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("trainedModelLinkedServiceName"))
                        {
                            trainedModelLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("trainedModelFilePath"))
                        {
                            trainedModelFilePath = property0.Value.GetObject();
                            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 AzureMLUpdateResourceActivity(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy, trainedModelName, trainedModelLinkedServiceName, trainedModelFilePath));
        }
        internal static RestResourceDataset DeserializeRestResourceDataset(JsonElement element)
        {
            string                 type              = default;
            Optional <string>      description       = default;
            Optional <object>      structure         = default;
            Optional <object>      schema            = default;
            LinkedServiceReference linkedServiceName = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> >   annotations                    = default;
            Optional <DatasetFolder>     folder                         = default;
            Optional <object>            relativeUrl                    = default;
            Optional <object>            requestMethod                  = default;
            Optional <object>            requestBody                    = default;
            Optional <object>            additionalHeaders              = default;
            Optional <object>            paginationRules                = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("structure"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("relativeUrl"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            relativeUrl = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("requestMethod"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            requestMethod = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("requestBody"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            requestBody = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("additionalHeaders"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            additionalHeaders = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("paginationRules"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            paginationRules = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new RestResourceDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, relativeUrl.Value, requestMethod.Value, requestBody.Value, additionalHeaders.Value, paginationRules.Value));
        }
コード例 #21
0
        internal static CopyActivity DeserializeCopyActivity(JsonElement element)
        {
            Optional <IList <DatasetReference> > inputs            = default;
            Optional <IList <DatasetReference> > outputs           = default;
            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;
            CopySource                 source                    = default;
            CopySink                   sink                      = default;
            Optional <object>          translator                = default;
            Optional <object>          enableStaging             = default;
            Optional <StagingSettings> stagingSettings           = default;
            Optional <object>          parallelCopies            = default;
            Optional <object>          dataIntegrationUnits      = default;
            Optional <object>          enableSkipIncompatibleRow = default;
            Optional <RedirectIncompatibleRowSettings> redirectIncompatibleRowSettings = default;
            Optional <IList <object> >   preserveRules                  = default;
            Optional <IList <object> >   preserve                       = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("inputs"))
                {
                    List <DatasetReference> array = new List <DatasetReference>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(DatasetReference.DeserializeDatasetReference(item));
                    }
                    inputs = array;
                    continue;
                }
                if (property.NameEquals("outputs"))
                {
                    List <DatasetReference> array = new List <DatasetReference>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(DatasetReference.DeserializeDatasetReference(item));
                    }
                    outputs = array;
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("source"))
                        {
                            source = CopySource.DeserializeCopySource(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("sink"))
                        {
                            sink = CopySink.DeserializeCopySink(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("translator"))
                        {
                            translator = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("enableStaging"))
                        {
                            enableStaging = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("stagingSettings"))
                        {
                            stagingSettings = StagingSettings.DeserializeStagingSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("parallelCopies"))
                        {
                            parallelCopies = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("dataIntegrationUnits"))
                        {
                            dataIntegrationUnits = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("enableSkipIncompatibleRow"))
                        {
                            enableSkipIncompatibleRow = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("redirectIncompatibleRowSettings"))
                        {
                            redirectIncompatibleRowSettings = RedirectIncompatibleRowSettings.DeserializeRedirectIncompatibleRowSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("preserveRules"))
                        {
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetObject());
                            }
                            preserveRules = array;
                            continue;
                        }
                        if (property0.NameEquals("preserve"))
                        {
                            List <object> array = new List <object>();
                            foreach (var item in property0.Value.EnumerateArray())
                            {
                                array.Add(item.GetObject());
                            }
                            preserve = array;
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new CopyActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, Optional.ToList(inputs), Optional.ToList(outputs), source, sink, translator.Value, enableStaging.Value, stagingSettings.Value, parallelCopies.Value, dataIntegrationUnits.Value, enableSkipIncompatibleRow.Value, redirectIncompatibleRowSettings.Value, Optional.ToList(preserveRules), Optional.ToList(preserve)));
        }
コード例 #22
0
        internal static Dataset DeserializeDataset(JsonElement element)
        {
            if (element.TryGetProperty("type", out JsonElement discriminator))
            {
                switch (discriminator.GetString())
                {
                case "AmazonMWSObject": return(AmazonMWSObjectDataset.DeserializeAmazonMWSObjectDataset(element));

                case "AmazonRedshiftTable": return(AmazonRedshiftTableDataset.DeserializeAmazonRedshiftTableDataset(element));

                case "Avro": return(AvroDataset.DeserializeAvroDataset(element));

                case "AzureDataExplorerTable": return(AzureDataExplorerTableDataset.DeserializeAzureDataExplorerTableDataset(element));

                case "AzureMariaDBTable": return(AzureMariaDBTableDataset.DeserializeAzureMariaDBTableDataset(element));

                case "AzureMySqlTable": return(AzureMySqlTableDataset.DeserializeAzureMySqlTableDataset(element));

                case "AzurePostgreSqlTable": return(AzurePostgreSqlTableDataset.DeserializeAzurePostgreSqlTableDataset(element));

                case "AzureSearchIndex": return(AzureSearchIndexDataset.DeserializeAzureSearchIndexDataset(element));

                case "AzureSqlDWTable": return(AzureSqlDWTableDataset.DeserializeAzureSqlDWTableDataset(element));

                case "AzureSqlMITable": return(AzureSqlMITableDataset.DeserializeAzureSqlMITableDataset(element));

                case "AzureSqlTable": return(AzureSqlTableDataset.DeserializeAzureSqlTableDataset(element));

                case "AzureTable": return(AzureTableDataset.DeserializeAzureTableDataset(element));

                case "Binary": return(BinaryDataset.DeserializeBinaryDataset(element));

                case "CassandraTable": return(CassandraTableDataset.DeserializeCassandraTableDataset(element));

                case "CommonDataServiceForAppsEntity": return(CommonDataServiceForAppsEntityDataset.DeserializeCommonDataServiceForAppsEntityDataset(element));

                case "ConcurObject": return(ConcurObjectDataset.DeserializeConcurObjectDataset(element));

                case "CosmosDbMongoDbApiCollection": return(CosmosDbMongoDbApiCollectionDataset.DeserializeCosmosDbMongoDbApiCollectionDataset(element));

                case "CosmosDbSqlApiCollection": return(CosmosDbSqlApiCollectionDataset.DeserializeCosmosDbSqlApiCollectionDataset(element));

                case "CouchbaseTable": return(CouchbaseTableDataset.DeserializeCouchbaseTableDataset(element));

                case "Db2Table": return(Db2TableDataset.DeserializeDb2TableDataset(element));

                case "DelimitedText": return(DelimitedTextDataset.DeserializeDelimitedTextDataset(element));

                case "DocumentDbCollection": return(DocumentDbCollectionDataset.DeserializeDocumentDbCollectionDataset(element));

                case "DrillTable": return(DrillTableDataset.DeserializeDrillTableDataset(element));

                case "DynamicsAXResource": return(DynamicsAXResourceDataset.DeserializeDynamicsAXResourceDataset(element));

                case "DynamicsCrmEntity": return(DynamicsCrmEntityDataset.DeserializeDynamicsCrmEntityDataset(element));

                case "DynamicsEntity": return(DynamicsEntityDataset.DeserializeDynamicsEntityDataset(element));

                case "EloquaObject": return(EloquaObjectDataset.DeserializeEloquaObjectDataset(element));

                case "GoogleAdWordsObject": return(GoogleAdWordsObjectDataset.DeserializeGoogleAdWordsObjectDataset(element));

                case "GoogleBigQueryObject": return(GoogleBigQueryObjectDataset.DeserializeGoogleBigQueryObjectDataset(element));

                case "GreenplumTable": return(GreenplumTableDataset.DeserializeGreenplumTableDataset(element));

                case "HBaseObject": return(HBaseObjectDataset.DeserializeHBaseObjectDataset(element));

                case "HiveObject": return(HiveObjectDataset.DeserializeHiveObjectDataset(element));

                case "HubspotObject": return(HubspotObjectDataset.DeserializeHubspotObjectDataset(element));

                case "ImpalaObject": return(ImpalaObjectDataset.DeserializeImpalaObjectDataset(element));

                case "InformixTable": return(InformixTableDataset.DeserializeInformixTableDataset(element));

                case "JiraObject": return(JiraObjectDataset.DeserializeJiraObjectDataset(element));

                case "Json": return(JsonDataset.DeserializeJsonDataset(element));

                case "MagentoObject": return(MagentoObjectDataset.DeserializeMagentoObjectDataset(element));

                case "MariaDBTable": return(MariaDBTableDataset.DeserializeMariaDBTableDataset(element));

                case "MarketoObject": return(MarketoObjectDataset.DeserializeMarketoObjectDataset(element));

                case "MicrosoftAccessTable": return(MicrosoftAccessTableDataset.DeserializeMicrosoftAccessTableDataset(element));

                case "MongoDbCollection": return(MongoDbCollectionDataset.DeserializeMongoDbCollectionDataset(element));

                case "MongoDbV2Collection": return(MongoDbV2CollectionDataset.DeserializeMongoDbV2CollectionDataset(element));

                case "MySqlTable": return(MySqlTableDataset.DeserializeMySqlTableDataset(element));

                case "NetezzaTable": return(NetezzaTableDataset.DeserializeNetezzaTableDataset(element));

                case "ODataResource": return(ODataResourceDataset.DeserializeODataResourceDataset(element));

                case "OdbcTable": return(OdbcTableDataset.DeserializeOdbcTableDataset(element));

                case "Office365Table": return(Office365Dataset.DeserializeOffice365Dataset(element));

                case "OracleServiceCloudObject": return(OracleServiceCloudObjectDataset.DeserializeOracleServiceCloudObjectDataset(element));

                case "OracleTable": return(OracleTableDataset.DeserializeOracleTableDataset(element));

                case "Orc": return(OrcDataset.DeserializeOrcDataset(element));

                case "Parquet": return(ParquetDataset.DeserializeParquetDataset(element));

                case "PaypalObject": return(PaypalObjectDataset.DeserializePaypalObjectDataset(element));

                case "PhoenixObject": return(PhoenixObjectDataset.DeserializePhoenixObjectDataset(element));

                case "PostgreSqlTable": return(PostgreSqlTableDataset.DeserializePostgreSqlTableDataset(element));

                case "PrestoObject": return(PrestoObjectDataset.DeserializePrestoObjectDataset(element));

                case "QuickBooksObject": return(QuickBooksObjectDataset.DeserializeQuickBooksObjectDataset(element));

                case "RelationalTable": return(RelationalTableDataset.DeserializeRelationalTableDataset(element));

                case "ResponsysObject": return(ResponsysObjectDataset.DeserializeResponsysObjectDataset(element));

                case "RestResource": return(RestResourceDataset.DeserializeRestResourceDataset(element));

                case "SalesforceMarketingCloudObject": return(SalesforceMarketingCloudObjectDataset.DeserializeSalesforceMarketingCloudObjectDataset(element));

                case "SalesforceObject": return(SalesforceObjectDataset.DeserializeSalesforceObjectDataset(element));

                case "SalesforceServiceCloudObject": return(SalesforceServiceCloudObjectDataset.DeserializeSalesforceServiceCloudObjectDataset(element));

                case "SapBwCube": return(SapBwCubeDataset.DeserializeSapBwCubeDataset(element));

                case "SapCloudForCustomerResource": return(SapCloudForCustomerResourceDataset.DeserializeSapCloudForCustomerResourceDataset(element));

                case "SapEccResource": return(SapEccResourceDataset.DeserializeSapEccResourceDataset(element));

                case "SapHanaTable": return(SapHanaTableDataset.DeserializeSapHanaTableDataset(element));

                case "SapOpenHubTable": return(SapOpenHubTableDataset.DeserializeSapOpenHubTableDataset(element));

                case "SapTableResource": return(SapTableResourceDataset.DeserializeSapTableResourceDataset(element));

                case "ServiceNowObject": return(ServiceNowObjectDataset.DeserializeServiceNowObjectDataset(element));

                case "ShopifyObject": return(ShopifyObjectDataset.DeserializeShopifyObjectDataset(element));

                case "SparkObject": return(SparkObjectDataset.DeserializeSparkObjectDataset(element));

                case "SqlServerTable": return(SqlServerTableDataset.DeserializeSqlServerTableDataset(element));

                case "SquareObject": return(SquareObjectDataset.DeserializeSquareObjectDataset(element));

                case "SybaseTable": return(SybaseTableDataset.DeserializeSybaseTableDataset(element));

                case "TeradataTable": return(TeradataTableDataset.DeserializeTeradataTableDataset(element));

                case "VerticaTable": return(VerticaTableDataset.DeserializeVerticaTableDataset(element));

                case "WebTable": return(WebTableDataset.DeserializeWebTableDataset(element));

                case "XeroObject": return(XeroObjectDataset.DeserializeXeroObjectDataset(element));

                case "ZohoObject": return(ZohoObjectDataset.DeserializeZohoObjectDataset(element));
                }
            }
            string                 type              = default;
            Optional <string>      description       = default;
            Optional <object>      structure         = default;
            Optional <object>      schema            = default;
            LinkedServiceReference linkedServiceName = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> >   annotations                    = default;
            Optional <DatasetFolder>     folder                         = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("structure"))
                {
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new Dataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties));
        }
コード例 #23
0
        internal static DataLakeAnalyticsUsqlActivity DeserializeDataLakeAnalyticsUsqlActivity(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;
            object scriptPath = default;
            LinkedServiceReference scriptLinkedService                  = default;
            Optional <object>      degreeOfParallelism                  = default;
            Optional <object>      priority                             = default;
            Optional <IDictionary <string, object> > parameters         = default;
            Optional <object>            runtimeVersion                 = default;
            Optional <object>            compilationMode                = default;
            IDictionary <string, object> additionalProperties           = default;
            Dictionary <string, object>  additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("scriptPath"))
                        {
                            scriptPath = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("scriptLinkedService"))
                        {
                            scriptLinkedService = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("degreeOfParallelism"))
                        {
                            degreeOfParallelism = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("priority"))
                        {
                            priority = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("parameters"))
                        {
                            Dictionary <string, object> dictionary = new Dictionary <string, object>();
                            foreach (var property1 in property0.Value.EnumerateObject())
                            {
                                dictionary.Add(property1.Name, property1.Value.GetObject());
                            }
                            parameters = dictionary;
                            continue;
                        }
                        if (property0.NameEquals("runtimeVersion"))
                        {
                            runtimeVersion = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("compilationMode"))
                        {
                            compilationMode = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new DataLakeAnalyticsUsqlActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, scriptPath, scriptLinkedService, degreeOfParallelism.Value, priority.Value, Optional.ToDictionary(parameters), runtimeVersion.Value, compilationMode.Value));
        }
コード例 #24
0
        internal static HDInsightLinkedService DeserializeHDInsightLinkedService(JsonElement element)
        {
            string type = default;
            Optional <IntegrationRuntimeReference> connectVia = default;
            Optional <string> description = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> > annotations                           = default;
            object                            clusterUri                     = default;
            Optional <object>                 userName                       = default;
            Optional <SecretBase>             password                       = default;
            Optional <LinkedServiceReference> linkedServiceName              = default;
            Optional <LinkedServiceReference> hcatalogLinkedServiceName      = default;
            Optional <object>                 encryptedCredential            = default;
            Optional <object>                 isEspEnabled                   = default;
            Optional <object>                 fileSystem                     = default;
            IDictionary <string, object>      additionalProperties           = default;
            Dictionary <string, object>       additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("connectVia"))
                {
                    connectVia = IntegrationRuntimeReference.DeserializeIntegrationRuntimeReference(property.Value);
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("clusterUri"))
                        {
                            clusterUri = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("userName"))
                        {
                            userName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("password"))
                        {
                            password = SecretBase.DeserializeSecretBase(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("linkedServiceName"))
                        {
                            linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("hcatalogLinkedServiceName"))
                        {
                            hcatalogLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("encryptedCredential"))
                        {
                            encryptedCredential = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("isEspEnabled"))
                        {
                            isEspEnabled = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("fileSystem"))
                        {
                            fileSystem = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new HDInsightLinkedService(type, connectVia.Value, description.Value, Optional.ToDictionary(parameters), Optional.ToList(annotations), additionalProperties, clusterUri, userName.Value, password.Value, linkedServiceName.Value, hcatalogLinkedServiceName.Value, encryptedCredential.Value, isEspEnabled.Value, fileSystem.Value));
        }
コード例 #25
0
        internal static DeleteActivity DeserializeDeleteActivity(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 <object>             recursive = default;
            Optional <int>                maxConcurrentConnections = default;
            Optional <object>             enableLogging            = default;
            Optional <LogStorageSettings> logStorageSettings       = default;
            DatasetReference              dataset                        = default;
            Optional <StoreReadSettings>  storeSettings                  = 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("recursive"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            recursive = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("maxConcurrentConnections"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            maxConcurrentConnections = property0.Value.GetInt32();
                            continue;
                        }
                        if (property0.NameEquals("enableLogging"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            enableLogging = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("logStorageSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            logStorageSettings = LogStorageSettings.DeserializeLogStorageSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("dataset"))
                        {
                            dataset = DatasetReference.DeserializeDatasetReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("storeSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            storeSettings = StoreReadSettings.DeserializeStoreReadSettings(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new DeleteActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, recursive.Value, Optional.ToNullable(maxConcurrentConnections), enableLogging.Value, logStorageSettings.Value, dataset, storeSettings.Value));
        }
コード例 #26
0
        internal static AzureBlobDataset DeserializeAzureBlobDataset(JsonElement element)
        {
            string                 type              = default;
            Optional <string>      description       = default;
            Optional <object>      structure         = default;
            Optional <object>      schema            = default;
            LinkedServiceReference linkedServiceName = default;
            Optional <IDictionary <string, ParameterSpecification> > parameters = default;
            Optional <IList <object> >      annotations                    = default;
            Optional <DatasetFolder>        folder                         = default;
            Optional <object>               folderPath                     = default;
            Optional <object>               tableRootLocation              = default;
            Optional <object>               fileName                       = default;
            Optional <object>               modifiedDatetimeStart          = default;
            Optional <object>               modifiedDatetimeEnd            = default;
            Optional <DatasetStorageFormat> format                         = default;
            Optional <DatasetCompression>   compression                    = default;
            IDictionary <string, object>    additionalProperties           = default;
            Dictionary <string, object>     additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("description"))
                {
                    description = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("structure"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    structure = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("schema"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    schema = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("linkedServiceName"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    Dictionary <string, ParameterSpecification> dictionary = new Dictionary <string, ParameterSpecification>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, ParameterSpecification.DeserializeParameterSpecification(property0.Value));
                    }
                    parameters = dictionary;
                    continue;
                }
                if (property.NameEquals("annotations"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <object> array = new List <object>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetObject());
                    }
                    annotations = array;
                    continue;
                }
                if (property.NameEquals("folder"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    folder = DatasetFolder.DeserializeDatasetFolder(property.Value);
                    continue;
                }
                if (property.NameEquals("typeProperties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("folderPath"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            folderPath = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("tableRootLocation"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            tableRootLocation = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("fileName"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            fileName = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("modifiedDatetimeStart"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            modifiedDatetimeStart = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("modifiedDatetimeEnd"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            modifiedDatetimeEnd = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("format"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            format = DatasetStorageFormat.DeserializeDatasetStorageFormat(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("compression"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            compression = DatasetCompression.DeserializeDatasetCompression(property0.Value);
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new AzureBlobDataset(type, description.Value, structure.Value, schema.Value, linkedServiceName, Optional.ToDictionary(parameters), Optional.ToList(annotations), folder.Value, additionalProperties, folderPath.Value, tableRootLocation.Value, fileName.Value, modifiedDatetimeStart.Value, modifiedDatetimeEnd.Value, format.Value, compression.Value));
        }
        internal static LookupActivity DeserializeLookupActivity(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;
            CopySource                   source                         = default;
            DatasetReference             dataset                        = default;
            Optional <object>            firstRowOnly                   = 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("source"))
                        {
                            source = CopySource.DeserializeCopySource(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("dataset"))
                        {
                            dataset = DatasetReference.DeserializeDatasetReference(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("firstRowOnly"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            firstRowOnly = property0.Value.GetObject();
                            continue;
                        }
                    }
                    continue;
                }
                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
            }
            additionalProperties = additionalPropertiesDictionary;
            return(new LookupActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional.ToList(userProperties), additionalProperties, linkedServiceName.Value, policy.Value, source, dataset, firstRowOnly.Value));
        }
        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"))
                {
                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
                    continue;
                }
                if (property.NameEquals("policy"))
                {
                    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"))
                {
                    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"))
                {
                    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"))
                {
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        if (property0.NameEquals("globalParameters"))
                        {
                            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"))
                        {
                            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"))
                        {
                            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)));
        }