Record Class AddSubscriptionReq

java.lang.Object
java.lang.Record
io.github.xezzon.zeroweb.subscription.entity.AddSubscriptionReq
Record Components:
appId - 订阅接口的第三方应用标识
openapiCode - 被订阅的对外接口的编码
All Implemented Interfaces:
io.github.xezzon.zeroweb.core.trait.Into<Subscription>

public record AddSubscriptionReq(@NotNull String appId, @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) String openapiCode) extends Record implements io.github.xezzon.zeroweb.core.trait.Into<Subscription>
添加订阅请求对象,用于向订阅系统申请订阅指定接口
Author:
xezzon
  • Constructor Summary

    Constructors
    Constructor
    Description
    AddSubscriptionReq(@NotNull String appId, @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) String openapiCode)
    Creates an instance of a AddSubscriptionReq record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull String
    Returns the value of the appId record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    将请求对象转换为订阅实体
    @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) String
    Returns the value of the openapiCode record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AddSubscriptionReq

      public AddSubscriptionReq(@NotNull @NotNull String appId, @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) String openapiCode)
      Creates an instance of a AddSubscriptionReq record class.
      Parameters:
      appId - the value for the appId record component
      openapiCode - the value for the openapiCode record component
  • Method Details

    • into

      public Subscription into()
      将请求对象转换为订阅实体
      Specified by:
      into in interface io.github.xezzon.zeroweb.core.trait.Into<Subscription>
      Returns:
      订阅实体对象
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • appId

      @NotNull public @NotNull String appId()
      Returns the value of the appId record component.
      Returns:
      the value of the appId record component
    • openapiCode

      @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) public @Alphanumeric(excludes="\\.") @NotBlank @Size(max=255) String openapiCode()
      Returns the value of the openapiCode record component.
      Returns:
      the value of the openapiCode record component