internal SsisLogLocation(object logPath, SsisLogLocationType type, SsisAccessCredential accessCredential, object logRefreshInterval) { LogPath = logPath; Type = type; AccessCredential = accessCredential; LogRefreshInterval = logRefreshInterval; }
public SsisLogLocation(object logPath, SsisLogLocationType type) { if (logPath == null) { throw new ArgumentNullException(nameof(logPath)); } LogPath = logPath; Type = type; }
internal static SsisLogLocation DeserializeSsisLogLocation(JsonElement element) { object logPath = default; SsisLogLocationType type = default; Optional <SsisAccessCredential> accessCredential = default; Optional <object> logRefreshInterval = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("logPath")) { logPath = property.Value.GetObject(); continue; } if (property.NameEquals("type")) { type = new SsisLogLocationType(property.Value.GetString()); continue; } if (property.NameEquals("typeProperties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("accessCredential")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } accessCredential = SsisAccessCredential.DeserializeSsisAccessCredential(property0.Value); continue; } if (property0.NameEquals("logRefreshInterval")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } logRefreshInterval = property0.Value.GetObject(); continue; } } continue; } } return(new SsisLogLocation(logPath, type, accessCredential.Value, logRefreshInterval.Value)); }