@Nullable LoginCredentials defaultCreds, RunScriptOptions options) {
Builder builder = LoginCredentials.builder(defaultCreds);
if (options.getLoginUser() != null)
builder.user(options.getLoginUser());
if (options.getLoginPassword() != null)
builder.password(options.getLoginPassword());
if (options.getLoginPrivateKey() != null)
builder.privateKey(options.getLoginPrivateKey());
if (options.shouldAuthenticateSudo() != null)
builder.authenticateSudo(true);
return builder.build();