public class IoTRequestBuilder
extends java.lang.Object
构造器和说明 |
---|
IoTRequestBuilder() |
限定符和类型 | 方法和说明 |
---|---|
IoTRequestBuilder |
addParam(java.lang.String key,
double value)
添加双精度浮点型业务参数
|
IoTRequestBuilder |
addParam(java.lang.String key,
float value)
添加浮点型业务参数
|
IoTRequestBuilder |
addParam(java.lang.String key,
int value)
添加整形业务参数
|
IoTRequestBuilder |
addParam(java.lang.String key,
java.util.List value)
添加列表型业务参数
|
IoTRequestBuilder |
addParam(java.lang.String key,
long value)
添加长整型业务参数
|
IoTRequestBuilder |
addParam(java.lang.String key,
java.util.Map value)
添加键值对型业务参数
|
IoTRequestBuilder |
addParam(java.lang.String key,
java.lang.Object value)
已过时。
|
IoTRequestBuilder |
addParam(java.lang.String key,
java.lang.String 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 |
setMockType(java.lang.String mockType)
设置 mock 类型
可不设置,默认为null,即无需 Mock
|
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 setMockType(java.lang.String mockType)
mockType
- 可为空public IoTRequestBuilder setParams(java.util.Map<java.lang.String,java.lang.Object> params)
params
- 业务参数@Deprecated public IoTRequestBuilder addParam(java.lang.String key, java.lang.Object value)
key
- 参数的key,不可为空value
- 参数的value,不可为空public IoTRequestBuilder addParam(java.lang.String key, java.lang.String value)
key
- 参数的key,不可为空value
- 参数的value,不可为空 String
public IoTRequestBuilder addParam(java.lang.String key, int value)
key
- 参数的key,不可为空value
- 参数的value Integer
public IoTRequestBuilder addParam(java.lang.String key, long value)
key
- 参数的key,不可为空value
- 参数的value Long
public IoTRequestBuilder addParam(java.lang.String key, float value)
key
- 参数的key,不可为空value
- 参数的value Float
public IoTRequestBuilder addParam(java.lang.String key, double value)
key
- 参数的key,不可为空value
- 参数的value Double
public IoTRequestBuilder addParam(java.lang.String key, java.util.List value)
key
- 参数的key,不可为空value
- 参数的value,不可为空 List
List<基本类型、List、Map>public IoTRequestBuilder addParam(java.lang.String key, java.util.Map value)
key
- 参数的key,不可为空value
- 参数的value,不可为空 Map
Mappublic IoTRequest build()
IllegalArgumentException