Record Class HuaweiSmsSender.HuaweiSmsConfig

java.lang.Object
java.lang.Record
cloud.opencode.base.sms.provider.HuaweiSmsSender.HuaweiSmsConfig
Record Components:
appKey - the application key | 应用Key
appSecret - the application secret | 应用密钥
sender - the sender channel (signature channel number) | 发送通道(签名通道号)
channelId - the channel ID (template ID) | 通道ID(模板ID)
region - the region code (e.g., cn-north-4) | 区域代码(如cn-north-4)
Enclosing class:
HuaweiSmsSender

public static record HuaweiSmsSender.HuaweiSmsConfig(String appKey, String appSecret, String sender, String channelId, String region) extends Record
Huawei SMS Configuration 华为短信配置

Configuration record for Huawei Cloud SMS service.

华为云短信服务配置记录。

Since:
JDK 25, opencode-base-sms V1.0.0
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • HuaweiSmsConfig

      public HuaweiSmsConfig(String appKey, String appSecret, String sender, String channelId, String region)
      Create config with validation 创建带验证的配置
  • Method Details

    • of

      public static HuaweiSmsSender.HuaweiSmsConfig of(String appKey, String appSecret, String sender, String channelId)
      Create config with default region 使用默认区域创建配置
      Parameters:
      appKey - the application key | 应用Key
      appSecret - the application secret | 应用密钥
      sender - the sender channel | 发送通道
      channelId - the channel ID | 通道ID
      Returns:
      the config | 配置
    • isConfigured

      public boolean isConfigured()
      Check if config is properly configured 检查配置是否正确配置
      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.
    • appKey

      public String appKey()
      Returns the value of the appKey record component.
      Returns:
      the value of the appKey record component
    • appSecret

      public String appSecret()
      Returns the value of the appSecret record component.
      Returns:
      the value of the appSecret record component
    • sender

      public String sender()
      Returns the value of the sender record component.
      Returns:
      the value of the sender record component
    • channelId

      public String channelId()
      Returns the value of the channelId record component.
      Returns:
      the value of the channelId record component
    • region

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