public class IoTRequestBuilder
extends java.lang.Object
setParams(Map)
和 addParam(String, Object)
接口仅支持如下类型的入餐
1. String构造器和说明 |
---|
IoTRequestBuilder() |
限定符和类型 | 方法和说明 |
---|---|
IoTRequestBuilder |
addParam(java.lang.String key,
java.lang.Object value)
添加业务参数
|
IoTRequest |
build()
构造 IoTRequest 实例
注意: 可能抛出
IllegalArgumentException |
IoTRequestBuilder |
setApiVersion(java.lang.String apiVersion)
设置请求版本号
必须设置
|
IoTRequestBuilder |
setAuthType(java.lang.String authType)
设置认证类型
可不设置,默认为null,即无需认证
|
IoTRequestBuilder |
setHost(java.lang.String host)
设置 Host
可不设置,缺省值为 IoT 官方服务的 host
|
IoTRequestBuilder |
setParams(java.util.Map<java.lang.String,java.lang.Object> params)
设置业务参数
|
IoTRequestBuilder |
setPath(java.lang.String path)
设置 Path
必须设置
|
IoTRequestBuilder |
setScheme(Scheme scheme)
设置 Scheme
可不设置,缺省值为 HTTPS
|
public IoTRequestBuilder setScheme(Scheme scheme)
scheme
- Schemepublic IoTRequestBuilder setHost(java.lang.String host)
host
- host, 可为空public IoTRequestBuilder setPath(java.lang.String path)
path
- path, 不可为空public IoTRequestBuilder setApiVersion(java.lang.String apiVersion)
apiVersion
- 请求版本号,不可为空public IoTRequestBuilder setAuthType(java.lang.String authType)
authType
- public IoTRequestBuilder setParams(java.util.Map<java.lang.String,java.lang.Object> params)
params
- 业务参数public IoTRequestBuilder addParam(java.lang.String key, java.lang.Object value)
key
- 参数的key,不可为空value
- 参数的value,不可为空public IoTRequest build()
IllegalArgumentException