251 lines
6.6 KiB
Java
251 lines
6.6 KiB
Java
package com.muse.dto;
|
|
|
|
import java.net.URI;
|
|
import java.util.Objects;
|
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
|
import com.fasterxml.jackson.annotation.JsonCreator;
|
|
import com.fasterxml.jackson.annotation.JsonValue;
|
|
import com.muse.dto.AccountExportTaskCreateDateRange;
|
|
import org.springframework.lang.Nullable;
|
|
import java.io.Serializable;
|
|
import java.time.OffsetDateTime;
|
|
import jakarta.validation.Valid;
|
|
import jakarta.validation.constraints.*;
|
|
import io.swagger.v3.oas.annotations.media.Schema;
|
|
|
|
|
|
import java.util.*;
|
|
import jakarta.annotation.Generated;
|
|
|
|
/**
|
|
* 创建个人中心导出任务请求
|
|
*/
|
|
|
|
@Schema(name = "AccountExportTaskCreate", description = "创建个人中心导出任务请求")
|
|
@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2026-05-24T16:47:40.290595+08:00[Asia/Shanghai]", comments = "Generator version: 7.22.0")
|
|
public class AccountExportTaskCreate implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private String commandId;
|
|
|
|
/**
|
|
* 导出类型
|
|
*/
|
|
public enum ExportTypeEnum {
|
|
PROFILE("profile"),
|
|
|
|
USAGE("usage"),
|
|
|
|
SECURITY_EVENTS("security_events"),
|
|
|
|
PURCHASES("purchases"),
|
|
|
|
LICENSES("licenses");
|
|
|
|
private final String value;
|
|
|
|
ExportTypeEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static ExportTypeEnum fromValue(String value) {
|
|
for (ExportTypeEnum b : ExportTypeEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private ExportTypeEnum exportType;
|
|
|
|
private @Nullable AccountExportTaskCreateDateRange dateRange;
|
|
|
|
/**
|
|
* 脱敏规则
|
|
*/
|
|
public enum DesensitizationRuleEnum {
|
|
STANDARD("standard"),
|
|
|
|
STRICT("strict");
|
|
|
|
private final String value;
|
|
|
|
DesensitizationRuleEnum(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
@JsonValue
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return String.valueOf(value);
|
|
}
|
|
|
|
@JsonCreator
|
|
public static DesensitizationRuleEnum fromValue(String value) {
|
|
for (DesensitizationRuleEnum b : DesensitizationRuleEnum.values()) {
|
|
if (b.value.equals(value)) {
|
|
return b;
|
|
}
|
|
}
|
|
throw new IllegalArgumentException("Unexpected value '" + value + "'");
|
|
}
|
|
}
|
|
|
|
private DesensitizationRuleEnum desensitizationRule = DesensitizationRuleEnum.STANDARD;
|
|
|
|
public AccountExportTaskCreate() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public AccountExportTaskCreate(String commandId, ExportTypeEnum exportType) {
|
|
this.commandId = commandId;
|
|
this.exportType = exportType;
|
|
}
|
|
|
|
public AccountExportTaskCreate commandId(String commandId) {
|
|
this.commandId = commandId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 幂等键
|
|
* @return commandId
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "commandId", description = "幂等键", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("commandId")
|
|
public String getCommandId() {
|
|
return commandId;
|
|
}
|
|
|
|
@JsonProperty("commandId")
|
|
public void setCommandId(String commandId) {
|
|
this.commandId = commandId;
|
|
}
|
|
|
|
public AccountExportTaskCreate exportType(ExportTypeEnum exportType) {
|
|
this.exportType = exportType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 导出类型
|
|
* @return exportType
|
|
*/
|
|
@NotNull
|
|
@Schema(name = "exportType", description = "导出类型", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("exportType")
|
|
public ExportTypeEnum getExportType() {
|
|
return exportType;
|
|
}
|
|
|
|
@JsonProperty("exportType")
|
|
public void setExportType(ExportTypeEnum exportType) {
|
|
this.exportType = exportType;
|
|
}
|
|
|
|
public AccountExportTaskCreate dateRange(@Nullable AccountExportTaskCreateDateRange dateRange) {
|
|
this.dateRange = dateRange;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* Get dateRange
|
|
* @return dateRange
|
|
*/
|
|
@Valid
|
|
@Schema(name = "dateRange", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("dateRange")
|
|
public @Nullable AccountExportTaskCreateDateRange getDateRange() {
|
|
return dateRange;
|
|
}
|
|
|
|
@JsonProperty("dateRange")
|
|
public void setDateRange(@Nullable AccountExportTaskCreateDateRange dateRange) {
|
|
this.dateRange = dateRange;
|
|
}
|
|
|
|
public AccountExportTaskCreate desensitizationRule(DesensitizationRuleEnum desensitizationRule) {
|
|
this.desensitizationRule = desensitizationRule;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 脱敏规则
|
|
* @return desensitizationRule
|
|
*/
|
|
|
|
@Schema(name = "desensitizationRule", description = "脱敏规则", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("desensitizationRule")
|
|
public DesensitizationRuleEnum getDesensitizationRule() {
|
|
return desensitizationRule;
|
|
}
|
|
|
|
@JsonProperty("desensitizationRule")
|
|
public void setDesensitizationRule(DesensitizationRuleEnum desensitizationRule) {
|
|
this.desensitizationRule = desensitizationRule;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
AccountExportTaskCreate accountExportTaskCreate = (AccountExportTaskCreate) o;
|
|
return Objects.equals(this.commandId, accountExportTaskCreate.commandId) &&
|
|
Objects.equals(this.exportType, accountExportTaskCreate.exportType) &&
|
|
Objects.equals(this.dateRange, accountExportTaskCreate.dateRange) &&
|
|
Objects.equals(this.desensitizationRule, accountExportTaskCreate.desensitizationRule);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(commandId, exportType, dateRange, desensitizationRule);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class AccountExportTaskCreate {\n");
|
|
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
|
sb.append(" exportType: ").append(toIndentedString(exportType)).append("\n");
|
|
sb.append(" dateRange: ").append(toIndentedString(dateRange)).append("\n");
|
|
sb.append(" desensitizationRule: ").append(toIndentedString(desensitizationRule)).append("\n");
|
|
sb.append("}");
|
|
return sb.toString();
|
|
}
|
|
|
|
/**
|
|
* Convert the given object to string with each line indented by 4 spaces
|
|
* (except the first line).
|
|
*/
|
|
private String toIndentedString(@Nullable Object o) {
|
|
return o == null ? "null" : o.toString().replace("\n", "\n ");
|
|
}
|
|
}
|
|
|