< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.AzureMLUpdateResourceActivity
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLUpdateResourceActivity.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLUpdateResourceActivity.Serialization.cs
Covered lines:0
Uncovered lines:117
Coverable lines:117
Total lines:239
Line coverage:0% (0 of 117)
Covered branches:0
Total branches:58
Branch coverage:0% (0 of 58)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_TrainedModelName()-0%100%
get_TrainedModelLinkedServiceName()-0%100%
get_TrainedModelFilePath()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeAzureMLUpdateResourceActivity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLUpdateResourceActivity.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using System.Collections.Generic;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> Azure ML Update Resource management activity. </summary>
 14    public partial class AzureMLUpdateResourceActivity : ExecutionActivity
 15    {
 16        /// <summary> Initializes a new instance of AzureMLUpdateResourceActivity. </summary>
 17        /// <param name="name"> Activity name. </param>
 18        /// <param name="trainedModelName"> Name of the Trained Model module in the Web Service experiment to be updated
 19        /// <param name="trainedModelLinkedServiceName"> Name of Azure Storage linked service holding the .ilearner file
 20        /// <param name="trainedModelFilePath"> The relative file path in trainedModelLinkedService to represent the .il
 21        /// <exception cref="ArgumentNullException"> <paramref name="name"/>, <paramref name="trainedModelName"/>, <para
 022        public AzureMLUpdateResourceActivity(string name, object trainedModelName, LinkedServiceReference trainedModelLi
 23        {
 024            if (name == null)
 25            {
 026                throw new ArgumentNullException(nameof(name));
 27            }
 028            if (trainedModelName == null)
 29            {
 030                throw new ArgumentNullException(nameof(trainedModelName));
 31            }
 032            if (trainedModelLinkedServiceName == null)
 33            {
 034                throw new ArgumentNullException(nameof(trainedModelLinkedServiceName));
 35            }
 036            if (trainedModelFilePath == null)
 37            {
 038                throw new ArgumentNullException(nameof(trainedModelFilePath));
 39            }
 40
 041            TrainedModelName = trainedModelName;
 042            TrainedModelLinkedServiceName = trainedModelLinkedServiceName;
 043            TrainedModelFilePath = trainedModelFilePath;
 044            Type = "AzureMLUpdateResource";
 045        }
 46
 47        /// <summary> Initializes a new instance of AzureMLUpdateResourceActivity. </summary>
 48        /// <param name="name"> Activity name. </param>
 49        /// <param name="type"> Type of activity. </param>
 50        /// <param name="description"> Activity description. </param>
 51        /// <param name="dependsOn"> Activity depends on condition. </param>
 52        /// <param name="userProperties"> Activity user properties. </param>
 53        /// <param name="additionalProperties"> . </param>
 54        /// <param name="linkedServiceName"> Linked service reference. </param>
 55        /// <param name="policy"> Activity policy. </param>
 56        /// <param name="trainedModelName"> Name of the Trained Model module in the Web Service experiment to be updated
 57        /// <param name="trainedModelLinkedServiceName"> Name of Azure Storage linked service holding the .ilearner file
 58        /// <param name="trainedModelFilePath"> The relative file path in trainedModelLinkedService to represent the .il
 059        internal AzureMLUpdateResourceActivity(string name, string type, string description, IList<ActivityDependency> d
 60        {
 061            TrainedModelName = trainedModelName;
 062            TrainedModelLinkedServiceName = trainedModelLinkedServiceName;
 063            TrainedModelFilePath = trainedModelFilePath;
 064            Type = type ?? "AzureMLUpdateResource";
 065        }
 66
 67        /// <summary> Name of the Trained Model module in the Web Service experiment to be updated. Type: string (or Exp
 068        public object TrainedModelName { get; set; }
 69        /// <summary> Name of Azure Storage linked service holding the .ilearner file that will be uploaded by the updat
 070        public LinkedServiceReference TrainedModelLinkedServiceName { get; set; }
 71        /// <summary> The relative file path in trainedModelLinkedService to represent the .ilearner file that will be u
 072        public object TrainedModelFilePath { get; set; }
 73    }
 74}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\AzureMLUpdateResourceActivity.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    public partial class AzureMLUpdateResourceActivity : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(LinkedServiceName))
 20            {
 021                writer.WritePropertyName("linkedServiceName");
 022                writer.WriteObjectValue(LinkedServiceName);
 23            }
 024            if (Optional.IsDefined(Policy))
 25            {
 026                writer.WritePropertyName("policy");
 027                writer.WriteObjectValue(Policy);
 28            }
 029            writer.WritePropertyName("name");
 030            writer.WriteStringValue(Name);
 031            writer.WritePropertyName("type");
 032            writer.WriteStringValue(Type);
 033            if (Optional.IsDefined(Description))
 34            {
 035                writer.WritePropertyName("description");
 036                writer.WriteStringValue(Description);
 37            }
 038            if (Optional.IsCollectionDefined(DependsOn))
 39            {
 040                writer.WritePropertyName("dependsOn");
 041                writer.WriteStartArray();
 042                foreach (var item in DependsOn)
 43                {
 044                    writer.WriteObjectValue(item);
 45                }
 046                writer.WriteEndArray();
 47            }
 048            if (Optional.IsCollectionDefined(UserProperties))
 49            {
 050                writer.WritePropertyName("userProperties");
 051                writer.WriteStartArray();
 052                foreach (var item in UserProperties)
 53                {
 054                    writer.WriteObjectValue(item);
 55                }
 056                writer.WriteEndArray();
 57            }
 058            writer.WritePropertyName("typeProperties");
 059            writer.WriteStartObject();
 060            writer.WritePropertyName("trainedModelName");
 061            writer.WriteObjectValue(TrainedModelName);
 062            writer.WritePropertyName("trainedModelLinkedServiceName");
 063            writer.WriteObjectValue(TrainedModelLinkedServiceName);
 064            writer.WritePropertyName("trainedModelFilePath");
 065            writer.WriteObjectValue(TrainedModelFilePath);
 066            writer.WriteEndObject();
 067            foreach (var item in AdditionalProperties)
 68            {
 069                writer.WritePropertyName(item.Key);
 070                writer.WriteObjectValue(item.Value);
 71            }
 072            writer.WriteEndObject();
 073        }
 74
 75        internal static AzureMLUpdateResourceActivity DeserializeAzureMLUpdateResourceActivity(JsonElement element)
 76        {
 077            Optional<LinkedServiceReference> linkedServiceName = default;
 078            Optional<ActivityPolicy> policy = default;
 079            string name = default;
 080            string type = default;
 081            Optional<string> description = default;
 082            Optional<IList<ActivityDependency>> dependsOn = default;
 083            Optional<IList<UserProperty>> userProperties = default;
 084            object trainedModelName = default;
 085            LinkedServiceReference trainedModelLinkedServiceName = default;
 086            object trainedModelFilePath = default;
 087            IDictionary<string, object> additionalProperties = default;
 088            Dictionary<string, object> additionalPropertiesDictionary = default;
 089            foreach (var property in element.EnumerateObject())
 90            {
 091                if (property.NameEquals("linkedServiceName"))
 92                {
 093                    linkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(property.Value);
 094                    continue;
 95                }
 096                if (property.NameEquals("policy"))
 97                {
 098                    policy = ActivityPolicy.DeserializeActivityPolicy(property.Value);
 099                    continue;
 100                }
 0101                if (property.NameEquals("name"))
 102                {
 0103                    name = property.Value.GetString();
 0104                    continue;
 105                }
 0106                if (property.NameEquals("type"))
 107                {
 0108                    type = property.Value.GetString();
 0109                    continue;
 110                }
 0111                if (property.NameEquals("description"))
 112                {
 0113                    description = property.Value.GetString();
 0114                    continue;
 115                }
 0116                if (property.NameEquals("dependsOn"))
 117                {
 0118                    List<ActivityDependency> array = new List<ActivityDependency>();
 0119                    foreach (var item in property.Value.EnumerateArray())
 120                    {
 0121                        array.Add(ActivityDependency.DeserializeActivityDependency(item));
 122                    }
 0123                    dependsOn = array;
 0124                    continue;
 125                }
 0126                if (property.NameEquals("userProperties"))
 127                {
 0128                    List<UserProperty> array = new List<UserProperty>();
 0129                    foreach (var item in property.Value.EnumerateArray())
 130                    {
 0131                        array.Add(UserProperty.DeserializeUserProperty(item));
 132                    }
 0133                    userProperties = array;
 0134                    continue;
 135                }
 0136                if (property.NameEquals("typeProperties"))
 137                {
 0138                    foreach (var property0 in property.Value.EnumerateObject())
 139                    {
 0140                        if (property0.NameEquals("trainedModelName"))
 141                        {
 0142                            trainedModelName = property0.Value.GetObject();
 0143                            continue;
 144                        }
 0145                        if (property0.NameEquals("trainedModelLinkedServiceName"))
 146                        {
 0147                            trainedModelLinkedServiceName = LinkedServiceReference.DeserializeLinkedServiceReference(pro
 0148                            continue;
 149                        }
 0150                        if (property0.NameEquals("trainedModelFilePath"))
 151                        {
 0152                            trainedModelFilePath = property0.Value.GetObject();
 153                            continue;
 154                        }
 155                    }
 156                    continue;
 157                }
 0158                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 0159                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 160            }
 0161            additionalProperties = additionalPropertiesDictionary;
 0162            return new AzureMLUpdateResourceActivity(name, type, description.Value, Optional.ToList(dependsOn), Optional
 163        }
 164    }
 165}