149 lines
4.1 KiB
Java
149 lines
4.1 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.JsonTypeName;
|
|
import java.util.UUID;
|
|
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;
|
|
|
|
/**
|
|
* PurchaseAssetRequest
|
|
*/
|
|
|
|
@JsonTypeName("purchaseAsset_request")
|
|
@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 PurchaseAssetRequest implements Serializable {
|
|
|
|
private static final long serialVersionUID = 1L;
|
|
|
|
private UUID commandId;
|
|
|
|
private @Nullable String licenseType;
|
|
|
|
private @Nullable String externalOrderRef;
|
|
|
|
public PurchaseAssetRequest() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Constructor with only required parameters
|
|
*/
|
|
public PurchaseAssetRequest(UUID commandId) {
|
|
this.commandId = commandId;
|
|
}
|
|
|
|
public PurchaseAssetRequest commandId(UUID commandId) {
|
|
this.commandId = commandId;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 幂等键,前端生成 UUID
|
|
* @return commandId
|
|
*/
|
|
@NotNull @Valid
|
|
@Schema(name = "commandId", description = "幂等键,前端生成 UUID", requiredMode = Schema.RequiredMode.REQUIRED)
|
|
@JsonProperty("commandId")
|
|
public UUID getCommandId() {
|
|
return commandId;
|
|
}
|
|
|
|
@JsonProperty("commandId")
|
|
public void setCommandId(UUID commandId) {
|
|
this.commandId = commandId;
|
|
}
|
|
|
|
public PurchaseAssetRequest licenseType(@Nullable String licenseType) {
|
|
this.licenseType = licenseType;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 许可类型选择
|
|
* @return licenseType
|
|
*/
|
|
|
|
@Schema(name = "licenseType", description = "许可类型选择", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("licenseType")
|
|
public @Nullable String getLicenseType() {
|
|
return licenseType;
|
|
}
|
|
|
|
@JsonProperty("licenseType")
|
|
public void setLicenseType(@Nullable String licenseType) {
|
|
this.licenseType = licenseType;
|
|
}
|
|
|
|
public PurchaseAssetRequest externalOrderRef(@Nullable String externalOrderRef) {
|
|
this.externalOrderRef = externalOrderRef;
|
|
return this;
|
|
}
|
|
|
|
/**
|
|
* 外部订单或授权引用标识
|
|
* @return externalOrderRef
|
|
*/
|
|
|
|
@Schema(name = "externalOrderRef", description = "外部订单或授权引用标识", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
|
|
@JsonProperty("externalOrderRef")
|
|
public @Nullable String getExternalOrderRef() {
|
|
return externalOrderRef;
|
|
}
|
|
|
|
@JsonProperty("externalOrderRef")
|
|
public void setExternalOrderRef(@Nullable String externalOrderRef) {
|
|
this.externalOrderRef = externalOrderRef;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) {
|
|
return true;
|
|
}
|
|
if (o == null || getClass() != o.getClass()) {
|
|
return false;
|
|
}
|
|
PurchaseAssetRequest purchaseAssetRequest = (PurchaseAssetRequest) o;
|
|
return Objects.equals(this.commandId, purchaseAssetRequest.commandId) &&
|
|
Objects.equals(this.licenseType, purchaseAssetRequest.licenseType) &&
|
|
Objects.equals(this.externalOrderRef, purchaseAssetRequest.externalOrderRef);
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
return Objects.hash(commandId, licenseType, externalOrderRef);
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append("class PurchaseAssetRequest {\n");
|
|
sb.append(" commandId: ").append(toIndentedString(commandId)).append("\n");
|
|
sb.append(" licenseType: ").append(toIndentedString(licenseType)).append("\n");
|
|
sb.append(" externalOrderRef: ").append(toIndentedString(externalOrderRef)).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 ");
|
|
}
|
|
}
|
|
|