Record Class UpsertTranslationReq
java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.locale.entity.UpsertTranslationReq
- Record Components:
namespace- 命名空间 与国际化内容的命名空间一致messageKey- 国际化内容language- 国际化语言标签content- 国际化文本
- All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.Into<Translation>
public record UpsertTranslationReq(@Alphanumeric @NotBlank @Size(max=255) String namespace, @Alphanumeric @NotBlank @Size(max=255) String messageKey, @Alphanumeric @NotBlank @Size(max=255) String language, @NotBlank String content)
extends Record
implements io.github.xezzon.zeroweb.core.trait.Into<Translation>
更新或新增国际化文本的请求体
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionUpsertTranslationReq(@Alphanumeric @NotBlank @Size(max=255) String namespace, @Alphanumeric @NotBlank @Size(max=255) String messageKey, @Alphanumeric @NotBlank @Size(max=255) String language, @NotBlank String content) Creates an instance of aUpsertTranslationReqrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank Stringcontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.into()@Alphanumeric @NotBlank @Size(max=255) Stringlanguage()Returns the value of thelanguagerecord component.@Alphanumeric @NotBlank @Size(max=255) StringReturns the value of themessageKeyrecord component.@Alphanumeric @NotBlank @Size(max=255) StringReturns the value of thenamespacerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UpsertTranslationReq
public UpsertTranslationReq(@Alphanumeric @NotBlank @Size(max=255) @Alphanumeric @NotBlank @Size(max=255) String namespace, @Alphanumeric @NotBlank @Size(max=255) @Alphanumeric @NotBlank @Size(max=255) String messageKey, @Alphanumeric @NotBlank @Size(max=255) @Alphanumeric @NotBlank @Size(max=255) String language, @NotBlank @NotBlank String content) Creates an instance of aUpsertTranslationReqrecord class.- Parameters:
namespace- the value for thenamespacerecord componentmessageKey- the value for themessageKeyrecord componentlanguage- the value for thelanguagerecord componentcontent- the value for thecontentrecord component
-
-
Method Details
-
into
- Specified by:
intoin interfaceio.github.xezzon.zeroweb.core.trait.Into<Translation>
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
namespace
-
messageKey
@Alphanumeric @NotBlank @Size(max=255) public @Alphanumeric @NotBlank @Size(max=255) String messageKey()Returns the value of themessageKeyrecord component.- Returns:
- the value of the
messageKeyrecord component
-
language
-
content
-