Merge branch 'dev' into NCBACK-33
# Conflicts: # src/main/java/ru/soune/nocopy/entity/file/ImageProtection.java # src/main/java/ru/soune/nocopy/entity/user/User.java # src/main/java/ru/soune/nocopy/handler/ImageFoundRequestHandler.java # src/main/java/ru/soune/nocopy/repository/AuthTokenRepository.java # src/main/java/ru/soune/nocopy/service/file/impl/FileUploadServiceImpl.java
This commit is contained in:
@@ -20,6 +20,9 @@ public class ChunkUploadResponse {
|
||||
@JsonProperty("chunk_size")
|
||||
private Long chunkSize;
|
||||
|
||||
@JsonProperty("file_id")
|
||||
private String fileId;
|
||||
|
||||
@JsonProperty("message")
|
||||
private String message;
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ public class FileEntityRequest {
|
||||
@JsonProperty("file_id")
|
||||
private String fileId;
|
||||
|
||||
@JsonProperty("full_delete")
|
||||
private Integer fullDelete;
|
||||
|
||||
@JsonProperty("upload_session_id")
|
||||
private String uploadSessionId;
|
||||
|
||||
|
||||
@@ -31,4 +31,5 @@ public class FileEntityResponse {
|
||||
private String downloadUrl;
|
||||
private boolean existsOnDisk;
|
||||
private Integer supportId;
|
||||
private String protectStatus;
|
||||
}
|
||||
|
||||
@@ -58,4 +58,16 @@ public class FileInfoUserResponse {
|
||||
|
||||
@JsonProperty("audios_violations")
|
||||
private Integer audiosViolations;
|
||||
|
||||
@JsonProperty("protected_files_count")
|
||||
private Long protectedFilesCount;
|
||||
|
||||
@JsonProperty("protected_audio_files_count")
|
||||
private Long protectedAudioFilesCount;
|
||||
|
||||
@JsonProperty("protected_video_files_count")
|
||||
private Long protectedVideoFilesCount;
|
||||
|
||||
@JsonProperty("protected_image_files_count")
|
||||
private Long protectedImageFilesCount;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
package ru.soune.nocopy.dto.file;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import lombok.Data;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public class GoogleVisionSearchResponse {
|
||||
|
||||
@JsonProperty("bestGuessLabels")
|
||||
private List<BestGuessLabel> bestGuessLabels;
|
||||
|
||||
@JsonProperty("fullMatchingImages")
|
||||
private List<ImageResult> fullMatchingImages;
|
||||
|
||||
@JsonProperty("visuallySimilarImages")
|
||||
private List<ImageResult> visuallySimilarImages;
|
||||
|
||||
@JsonProperty("pagesWithMatchingImages")
|
||||
private List<PageResult> pagesWithMatchingImages;
|
||||
|
||||
@JsonProperty("partialMatchingImages")
|
||||
private List<ImageResult> partialMatchingImages;
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class BestGuessLabel {
|
||||
@JsonProperty("label")
|
||||
private String label;
|
||||
|
||||
@JsonProperty("languageCode")
|
||||
private String languageCode;
|
||||
}
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class ImageResult {
|
||||
@JsonProperty("url")
|
||||
private String url;
|
||||
|
||||
@JsonProperty("score")
|
||||
private Float score;
|
||||
|
||||
@JsonProperty("height")
|
||||
private Integer height;
|
||||
|
||||
@JsonProperty("width")
|
||||
private Integer width;
|
||||
}
|
||||
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
public static class PageResult {
|
||||
@JsonProperty("url")
|
||||
private String url;
|
||||
|
||||
@JsonProperty("pageTitle")
|
||||
private String pageTitle;
|
||||
|
||||
@JsonProperty("fullMatchingImages")
|
||||
private List<ImageResult> fullMatchingImages;
|
||||
|
||||
@JsonProperty("partialMatchingImages")
|
||||
private List<ImageResult> partialMatchingImages;
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -5,10 +5,11 @@ import lombok.Value;
|
||||
|
||||
@Value
|
||||
@Builder
|
||||
public class SimilarFileResponse {
|
||||
public class SimilarFileDTO {
|
||||
String fileId;
|
||||
String originalFileName;
|
||||
Long fileSize;
|
||||
Integer hammingDistance;
|
||||
String similarityLevel;
|
||||
Long ownerId;
|
||||
}
|
||||
Reference in New Issue
Block a user