internal static LinkedServiceReference DeserializeLinkedServiceReference(JsonElement element)
        {
            LinkedServiceReferenceType type = default;
            string referenceName            = default;
            Optional <IDictionary <string, object> > parameters = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = new LinkedServiceReferenceType(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("referenceName"))
                {
                    referenceName = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("parameters"))
                {
                    Dictionary <string, object> dictionary = new Dictionary <string, object>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, property0.Value.GetObject());
                    }
                    parameters = dictionary;
                    continue;
                }
            }
            return(new LinkedServiceReference(type, referenceName, Optional.ToDictionary(parameters)));
        }
        public LinkedServiceReference(LinkedServiceReferenceType type, string referenceName)
        {
            if (referenceName == null)
            {
                throw new ArgumentNullException(nameof(referenceName));
            }

            Type          = type;
            ReferenceName = referenceName;
            Parameters    = new ChangeTrackingDictionary <string, object>();
        }
 internal LinkedServiceReference(LinkedServiceReferenceType type, string referenceName, IDictionary <string, object> parameters)
 {
     Type          = type;
     ReferenceName = referenceName;
     Parameters    = parameters;
 }