internal static ScriptActivityTypePropertiesLogSettings DeserializeScriptActivityTypePropertiesLogSettings(JsonElement element)
        {
            ScriptActivityLogDestination   logDestination      = default;
            Optional <LogLocationSettings> logLocationSettings = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("logDestination"))
                {
                    logDestination = new ScriptActivityLogDestination(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("logLocationSettings"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    logLocationSettings = LogLocationSettings.DeserializeLogLocationSettings(property.Value);
                    continue;
                }
            }
            return(new ScriptActivityTypePropertiesLogSettings(logDestination, logLocationSettings.Value));
        }
コード例 #2
0
        internal static LogSettings DeserializeLogSettings(JsonElement element)
        {
            Optional <object> enableCopyActivityLog = default;
            Optional <CopyActivityLogSettings> copyActivityLogSettings = default;
            LogLocationSettings logLocationSettings = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("enableCopyActivityLog"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    enableCopyActivityLog = property.Value.GetObject();
                    continue;
                }
                if (property.NameEquals("copyActivityLogSettings"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    copyActivityLogSettings = CopyActivityLogSettings.DeserializeCopyActivityLogSettings(property.Value);
                    continue;
                }
                if (property.NameEquals("logLocationSettings"))
                {
                    logLocationSettings = LogLocationSettings.DeserializeLogLocationSettings(property.Value);
                    continue;
                }
            }
            return(new LogSettings(enableCopyActivityLog.Value, copyActivityLogSettings.Value, logLocationSettings));
        }