Record Class AliSmsSender.AliSmsConfig

java.lang.Object
java.lang.Record
cloud.opencode.base.sms.provider.AliSmsSender.AliSmsConfig
Record Components:
accessKeyId - the AccessKey ID | AccessKey ID
accessKeySecret - the AccessKey Secret | AccessKey Secret
signName - the SMS signature name | 短信签名名称
regionId - the region ID (e.g., cn-hangzhou) | 区域ID(例如:cn-hangzhou)
Enclosing class:
AliSmsSender

public static record AliSmsSender.AliSmsConfig(String accessKeyId, String accessKeySecret, String signName, String regionId) extends Record
Aliyun SMS Configuration 阿里云短信配置
Since:
JDK 25, opencode-base-sms V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • AliSmsConfig

      public AliSmsConfig(String accessKeyId, String accessKeySecret, String signName, String regionId)
      Compact constructor with validation 带验证的紧凑构造函数
  • Method Details

    • of

      public static AliSmsSender.AliSmsConfig of(String accessKeyId, String accessKeySecret, String signName)
      Create config with default region 使用默认区域创建配置
      Parameters:
      accessKeyId - the AccessKey ID | AccessKey ID
      accessKeySecret - the AccessKey Secret | AccessKey Secret
      signName - the sign name | 签名名称
      Returns:
      the config | 配置
    • isConfigured

      public boolean isConfigured()
      Check if config is valid 检查配置是否有效
      Returns:
      true if configured | 如果已配置返回true
    • 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.
    • accessKeyId

      public String accessKeyId()
      Returns the value of the accessKeyId record component.
      Returns:
      the value of the accessKeyId record component
    • accessKeySecret

      public String accessKeySecret()
      Returns the value of the accessKeySecret record component.
      Returns:
      the value of the accessKeySecret record component
    • signName

      public String signName()
      Returns the value of the signName record component.
      Returns:
      the value of the signName record component
    • regionId

      public String regionId()
      Returns the value of the regionId record component.
      Returns:
      the value of the regionId record component