init
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
public class FileFinalizeResponse : IResponse
|
||||
{
|
||||
public FileFinalizeResponse()
|
||||
{
|
||||
IsSuccess = true;
|
||||
}
|
||||
|
||||
public FileFinalizeResponse(bool tryAgain)
|
||||
{
|
||||
TryAgain = tryAgain;
|
||||
}
|
||||
|
||||
public FileFinalizeResponse(string error)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(error));
|
||||
}
|
||||
|
||||
Error = error;
|
||||
}
|
||||
|
||||
public bool IsSuccess { get; }
|
||||
|
||||
public string Error { get; }
|
||||
|
||||
public bool TryAgain { get; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Net;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
public class FileFinalizeResponseV3 : IResponse
|
||||
{
|
||||
|
||||
public FileFinalizeResponseV3()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public FileFinalizeResponseV3(bool tryAgain)
|
||||
{
|
||||
TryAgain = tryAgain;
|
||||
}
|
||||
|
||||
public FileFinalizeResponseV3(string error)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(error))
|
||||
{
|
||||
throw new ArgumentNullException(nameof(error));
|
||||
}
|
||||
|
||||
Error = error;
|
||||
}
|
||||
|
||||
public FileFinalizeResponseV3(Guid fajlId, bool isSuccess, string error, bool tryAgain, HttpStatusCode statusCode, string errorMessage, Exception exception) : this(isSuccess)
|
||||
{
|
||||
FajlAzonosito = fajlId;
|
||||
Error = error;
|
||||
TryAgain = tryAgain;
|
||||
StatusCode = statusCode;
|
||||
ErrorMessage = errorMessage;
|
||||
Exception = exception;
|
||||
}
|
||||
|
||||
public Guid FajlAzonosito { get; }
|
||||
|
||||
public bool IsSuccess { get; }
|
||||
|
||||
public string Error { get; }
|
||||
|
||||
public bool TryAgain { get; }
|
||||
public HttpStatusCode StatusCode { get; }
|
||||
public string ErrorMessage { get; }
|
||||
public Exception Exception { get; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,13 @@
|
||||
using System;
|
||||
|
||||
namespace Kreta.Client.FileService.Response.FileFinalize
|
||||
{
|
||||
public class FinalizedFileDtoV3
|
||||
{
|
||||
public Guid FajlId { get; set; }
|
||||
|
||||
public string HibaSzoveg { get; set; }
|
||||
|
||||
public bool IsSikeres { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,18 @@
|
||||
using System.Collections.Generic;
|
||||
using Kreta.Client.FileService.Model;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Kreta.Client.FileService.Response
|
||||
{
|
||||
internal class InternalFileFinalizeResponse
|
||||
{
|
||||
[JsonProperty("fajlok")]
|
||||
public List<FileDataWithError> Fajlok { get; set; }
|
||||
|
||||
[JsonProperty("hibaSzoveg")]
|
||||
public string HibaSzoveg { get; set; }
|
||||
|
||||
[JsonProperty("isSikeres")]
|
||||
public bool IsSikeres { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user