This commit is contained in:
Zeeshaun
2026-03-24 15:28:37 -05:00
parent 9cc87337b8
commit 73d62efb39
58 changed files with 2952 additions and 0 deletions
@@ -0,0 +1,38 @@
using System.Collections.Generic;
using LCU.Library.Internal.ApiResponse.Models;
using System.ComponentModel.DataAnnotations;
using System;
namespace LCU.Api.Internal.FTPLib.Models
{
[Obsolete("Please use SftpDownloadFileRequest and SshFtpRequst Models")]
public class SftpRequest : ReturnResponse, IValidatableObject
{
[Required]
public ProtocolType Protocol { get; set; }
[Required]
public string HostName { get; set; }
[Required, Range(1, 999999)]
public int PortNumber { get; set; } = 22;
[Required]
public string UserName { get; set; }
[Required]
public string Password { get; set; }
[Required]
public string SshHostKeyFingerprint { get; set; }
public string LocalFilePath { get; set; }
[Required]
public string RemoteFilePath { get; set; }
public byte[] LocalFileData { get; set; }
public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
{
if (string.IsNullOrWhiteSpace(LocalFilePath) && LocalFileData == null)
{
yield return new ValidationResult(
$"One of LocalFilePath or LocalFileData bytes are required.",
new[] {nameof(LocalFileData), nameof(LocalFilePath)});
}
}
}
}