コード例 #1
0
 internal CopyActivity(string name, string type, string description, IList <ActivityDependency> dependsOn, IList <UserProperty> userProperties, IDictionary <string, object> additionalProperties, LinkedServiceReference linkedServiceName, ActivityPolicy policy, IList <DatasetReference> inputs, IList <DatasetReference> outputs, CopySource source, CopySink sink, object translator, object enableStaging, StagingSettings stagingSettings, object parallelCopies, object dataIntegrationUnits, object enableSkipIncompatibleRow, RedirectIncompatibleRowSettings redirectIncompatibleRowSettings, LogStorageSettings logStorageSettings, LogSettings logSettings, IList <object> preserveRules, IList <object> preserve, object validateDataConsistency, SkipErrorFile skipErrorFile) : base(name, type, description, dependsOn, userProperties, additionalProperties, linkedServiceName, policy)
 {
     Inputs                          = inputs;
     Outputs                         = outputs;
     Source                          = source;
     Sink                            = sink;
     Translator                      = translator;
     EnableStaging                   = enableStaging;
     StagingSettings                 = stagingSettings;
     ParallelCopies                  = parallelCopies;
     DataIntegrationUnits            = dataIntegrationUnits;
     EnableSkipIncompatibleRow       = enableSkipIncompatibleRow;
     RedirectIncompatibleRowSettings = redirectIncompatibleRowSettings;
     LogStorageSettings              = logStorageSettings;
     LogSettings                     = logSettings;
     PreserveRules                   = preserveRules;
     Preserve                        = preserve;
     ValidateDataConsistency         = validateDataConsistency;
     SkipErrorFile                   = skipErrorFile;
     Type                            = type ?? "Copy";
 }
コード例 #2
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 <LogStorageSettings> logStorageSettings             = default;
            Optional <LogSettings>        logSettings                    = default;
            Optional <IList <object> >    preserveRules                  = default;
            Optional <IList <object> >    preserve                       = default;
            Optional <object>             validateDataConsistency        = default;
            Optional <SkipErrorFile>      skipErrorFile                  = default;
            IDictionary <string, object>  additionalProperties           = default;
            Dictionary <string, object>   additionalPropertiesDictionary = new Dictionary <string, object>();

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("inputs"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    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"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    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"))
                {
                    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("sink"))
                        {
                            sink = CopySink.DeserializeCopySink(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("translator"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            translator = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("enableStaging"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            enableStaging = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("stagingSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            stagingSettings = StagingSettings.DeserializeStagingSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("parallelCopies"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            parallelCopies = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("dataIntegrationUnits"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            dataIntegrationUnits = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("enableSkipIncompatibleRow"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            enableSkipIncompatibleRow = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("redirectIncompatibleRowSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            redirectIncompatibleRowSettings = RedirectIncompatibleRowSettings.DeserializeRedirectIncompatibleRowSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("logStorageSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            logStorageSettings = LogStorageSettings.DeserializeLogStorageSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("logSettings"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            logSettings = LogSettings.DeserializeLogSettings(property0.Value);
                            continue;
                        }
                        if (property0.NameEquals("preserveRules"))
                        {
                            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());
                            }
                            preserveRules = array;
                            continue;
                        }
                        if (property0.NameEquals("preserve"))
                        {
                            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());
                            }
                            preserve = array;
                            continue;
                        }
                        if (property0.NameEquals("validateDataConsistency"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            validateDataConsistency = property0.Value.GetObject();
                            continue;
                        }
                        if (property0.NameEquals("skipErrorFile"))
                        {
                            if (property0.Value.ValueKind == JsonValueKind.Null)
                            {
                                property0.ThrowNonNullablePropertyIsNull();
                                continue;
                            }
                            skipErrorFile = SkipErrorFile.DeserializeSkipErrorFile(property0.Value);
                            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, logStorageSettings.Value, logSettings.Value, Optional.ToList(preserveRules), Optional.ToList(preserve), validateDataConsistency.Value, skipErrorFile.Value));
        }