public class FirmwaresRequestExecutor extends PaginatedRequestExecutor<Firmwares>
FirmwaresApi
. Use this class if you want to get
firmwares through fluent API in chained fashion, for example:
IKontaktCloud kontaktCloud = KontaktCloud.newInstance();
Firmwares firmwares = kontaktCloud.firmwares().fetch()
.forDevices("4DgT", "6Hyj")
.execute();
Keep in mind that devices must be specified so invocation of forDevices
method is mandatory.
Otherwise an exception will be thrown.eTag, maxResult, order, orderBy, query, startIndex
Constructor and Description |
---|
FirmwaresRequestExecutor(FirmwaresService firmwaresService)
Constructs request executor initialized with corresponding service class.
|
Modifier and Type | Method and Description |
---|---|
FirmwaresRequestExecutor |
eTag(java.lang.String eTag)
Specifies HTTP entity tag purposed for caching REST API calls.
|
Firmwares |
execute()
Executes created request synchronously.
|
void |
execute(CloudCallback<Firmwares> callback)
Executes created request asynchronously and invokes callback with the result.
|
FirmwaresRequestExecutor |
filter(java.lang.String query)
Specifies the filter for requested data.
|
FirmwaresRequestExecutor |
forDevices(java.util.List<java.lang.String> uniqueIds)
Specifies devices.
|
FirmwaresRequestExecutor |
forDevices(java.util.Set<java.lang.String> uniqueIds)
Specifies devices.
|
FirmwaresRequestExecutor |
forDevices(java.lang.String... uniqueIds)
Specifies devices.
|
FirmwaresRequestExecutor |
maxResult(int maxResult)
Specifies the maximum size of response data collection.
|
FirmwaresRequestExecutor |
orderBy(OrderBy orderBy,
Order order)
Specifies the ordering of response data elements.
|
protected java.util.Map<java.lang.String,java.lang.String> |
params()
Composes the request's query parameters in map.
|
protected retrofit2.Call<Firmwares> |
prepareCall()
Prepares a request to execute.
|
FirmwaresRequestExecutor |
startIndex(int startIndex)
Specifies the start index of requested data.
|
FirmwaresRequestExecutor |
withType(FirmwareType type)
Specifies firmware type.
|
public FirmwaresRequestExecutor(FirmwaresService firmwaresService)
firmwaresService
- the firmwares API service.public FirmwaresRequestExecutor forDevices(java.lang.String... uniqueIds)
uniqueIds
- the device unique identifiers.public FirmwaresRequestExecutor forDevices(java.util.List<java.lang.String> uniqueIds)
uniqueIds
- the device unique identifiers.public FirmwaresRequestExecutor forDevices(java.util.Set<java.lang.String> uniqueIds)
uniqueIds
- the device unique identifiers.public FirmwaresRequestExecutor withType(FirmwareType type)
type
- the firmware type.public FirmwaresRequestExecutor startIndex(int startIndex)
startIndex
in class PaginatedRequestExecutor<Firmwares>
startIndex
- the start index.public FirmwaresRequestExecutor maxResult(int maxResult)
maxResult
in class PaginatedRequestExecutor<Firmwares>
maxResult
- the maximum response size value.public FirmwaresRequestExecutor filter(java.lang.String query)
filter
in class PaginatedRequestExecutor<Firmwares>
query
- the query filter.public FirmwaresRequestExecutor orderBy(OrderBy orderBy, Order order)
orderBy
in class PaginatedRequestExecutor<Firmwares>
orderBy
- the field type that specifies the order by column.order
- ascending or descending.public FirmwaresRequestExecutor eTag(java.lang.String eTag)
eTag
in class PaginatedRequestExecutor<Firmwares>
eTag
- the entity tag value.public Firmwares execute() throws java.io.IOException, KontaktCloudException
execute
in class RequestExecutor<Firmwares>
java.io.IOException
- exceptionKontaktCloudException
- exceptionpublic void execute(CloudCallback<Firmwares> callback)
execute
in class RequestExecutor<Firmwares>
callback
- the callback object.protected retrofit2.Call<Firmwares> prepareCall()
prepareCall
in class RequestExecutor<Firmwares>
protected java.util.Map<java.lang.String,java.lang.String> params()
params
in class PaginatedRequestExecutor<Firmwares>