internal static IntegrationRuntimeReference DeserializeIntegrationRuntimeReference(JsonElement element)
        {
            IntegrationRuntimeReferenceType type = default;
            string referenceName = default;
            Optional <IDictionary <string, object> > parameters = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("type"))
                {
                    type = new IntegrationRuntimeReferenceType(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 IntegrationRuntimeReference(type, referenceName, Optional.ToDictionary(parameters)));
        }
        public IntegrationRuntimeReference(IntegrationRuntimeReferenceType type, string referenceName)
        {
            if (referenceName == null)
            {
                throw new ArgumentNullException(nameof(referenceName));
            }

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