DigitalTwinsImpl Class

  • java.lang.Object
    • DigitalTwins
      • com.microsoft.azure.sdk.iot.service.digitaltwin.generated.implementation.DigitalTwinsImpl

public class DigitalTwinsImpl implements DigitalTwins

An instance of this class provides access to all the operations defined in DigitalTwins.

Constructor Summary

Constructor Description
DigitalTwinsImpl(Retrofit retrofit, IotHubGatewayServiceAPIsImpl client)

Initializes an instance of DigitalTwins.

Method Summary

Modifier and Type Method and Description
Object getDigitalTwin(String id)

Gets a digital twin.

Observable<Object> getDigitalTwinAsync(String id)

Gets a digital twin.

ServiceFuture<Object> getDigitalTwinAsync(String id, final ServiceCallback<Object> serviceCallback)

Gets a digital twin.

Observable<ServiceResponseWithHeaders<Object, DigitalTwinGetDigitalTwinHeaders>> getDigitalTwinWithServiceResponseAsync(String id)

Gets a digital twin.

Object invokeComponentCommand(String id, String componentPath, String commandName)

Invoke a digital twin command. Invoke a digital twin command.

Object invokeComponentCommand(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin command. Invoke a digital twin command.

Observable<Object> invokeComponentCommandAsync(String id, String componentPath, String commandName)

Invoke a digital twin command. Invoke a digital twin command.

ServiceFuture<Object> invokeComponentCommandAsync(String id, String componentPath, String commandName, final ServiceCallback<Object> serviceCallback)

Invoke a digital twin command. Invoke a digital twin command.

Observable<Object> invokeComponentCommandAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin command. Invoke a digital twin command.

ServiceFuture<Object> invokeComponentCommandAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds, final ServiceCallback<Object> serviceCallback)

Invoke a digital twin command. Invoke a digital twin command.

Observable<ServiceResponseWithHeaders<Object, DigitalTwinInvokeComponentCommandHeaders>> invokeComponentCommandWithServiceResponseAsync(String id, String componentPath, String commandName)

Invoke a digital twin command. Invoke a digital twin command.

Observable<ServiceResponseWithHeaders<Object, DigitalTwinInvokeComponentCommandHeaders>> invokeComponentCommandWithServiceResponseAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin command. Invoke a digital twin command.

Object invokeRootLevelCommand(String id, String commandName)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Object invokeRootLevelCommand(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Observable<Object> invokeRootLevelCommandAsync(String id, String commandName)

Invoke a digital twin root level command. Invoke a digital twin root level command.

ServiceFuture<Object> invokeRootLevelCommandAsync(String id, String commandName, final ServiceCallback<Object> serviceCallback)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Observable<Object> invokeRootLevelCommandAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin root level command. Invoke a digital twin root level command.

ServiceFuture<Object> invokeRootLevelCommandAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds, final ServiceCallback<Object> serviceCallback)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Observable<ServiceResponseWithHeaders<Object, DigitalTwinInvokeRootLevelCommandHeaders>> invokeRootLevelCommandWithServiceResponseAsync(String id, String commandName)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Observable<ServiceResponseWithHeaders<Object, DigitalTwinInvokeRootLevelCommandHeaders>> invokeRootLevelCommandWithServiceResponseAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin root level command. Invoke a digital twin root level command.

void updateDigitalTwin(String id, List<Object> digitalTwinPatch)

Updates a digital twin.

void updateDigitalTwin(String id, List<Object> digitalTwinPatch, String ifMatch)

Updates a digital twin.

Observable<Void> updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch)

Updates a digital twin.

ServiceFuture<Void> updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch, final ServiceCallback<Void> serviceCallback)

Updates a digital twin.

Observable<Void> updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch, String ifMatch)

Updates a digital twin.

ServiceFuture<Void> updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch, String ifMatch, final ServiceCallback<Void> serviceCallback)

Updates a digital twin.

Observable<ServiceResponseWithHeaders<Void, DigitalTwinUpdateDigitalTwinHeaders>> updateDigitalTwinWithServiceResponseAsync(String id, List<Object> digitalTwinPatch)

Updates a digital twin.

Observable<ServiceResponseWithHeaders<Void, DigitalTwinUpdateDigitalTwinHeaders>> updateDigitalTwinWithServiceResponseAsync(String id, List<Object> digitalTwinPatch, String ifMatch)

Updates a digital twin.

Constructor Details

DigitalTwinsImpl

public DigitalTwinsImpl(Retrofit retrofit, IotHubGatewayServiceAPIsImpl client)

Initializes an instance of DigitalTwins.

Parameters:

retrofit - the Retrofit instance built from a Retrofit Builder.
client - the instance of the service client containing this operation class.

Method Details

getDigitalTwin

public Object getDigitalTwin(String id)

Gets a digital twin.

Overrides:

DigitalTwinsImpl.getDigitalTwin(String id)

Parameters:

id - Digital Twin ID.

Returns:

the Object object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

getDigitalTwinAsync

public Observable getDigitalTwinAsync(String id)

Gets a digital twin.

Overrides:

DigitalTwinsImpl.getDigitalTwinAsync(String id)

Parameters:

id - Digital Twin ID.

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getDigitalTwinAsync

public ServiceFuture getDigitalTwinAsync(String id, final ServiceCallback serviceCallback)

Gets a digital twin.

Overrides:

DigitalTwinsImpl.getDigitalTwinAsync(String id, final ServiceCallback<Object> serviceCallback)

Parameters:

id - Digital Twin ID.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

getDigitalTwinWithServiceResponseAsync

public Observable> getDigitalTwinWithServiceResponseAsync(String id)

Gets a digital twin.

Overrides:

DigitalTwinsImpl.getDigitalTwinWithServiceResponseAsync(String id)

Parameters:

id - Digital Twin ID.

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeComponentCommand

public Object invokeComponentCommand(String id, String componentPath, String commandName)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommand(String id, String componentPath, String commandName)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value

Returns:

the Object object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

invokeComponentCommand

public Object invokeComponentCommand(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommand(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Returns:

the Object object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

invokeComponentCommandAsync

public Observable invokeComponentCommandAsync(String id, String componentPath, String commandName)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommandAsync(String id, String componentPath, String commandName)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeComponentCommandAsync

public ServiceFuture invokeComponentCommandAsync(String id, String componentPath, String commandName, final ServiceCallback serviceCallback)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommandAsync(String id, String componentPath, String commandName, final ServiceCallback<Object> serviceCallback)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeComponentCommandAsync

public Observable invokeComponentCommandAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommandAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeComponentCommandAsync

public ServiceFuture invokeComponentCommandAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds, final ServiceCallback serviceCallback)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommandAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds, final ServiceCallback<Object> serviceCallback)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeComponentCommandWithServiceResponseAsync

public Observable> invokeComponentCommandWithServiceResponseAsync(String id, String componentPath, String commandName)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommandWithServiceResponseAsync(String id, String componentPath, String commandName)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeComponentCommandWithServiceResponseAsync

public Observable> invokeComponentCommandWithServiceResponseAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin command. Invoke a digital twin command.

Overrides:

DigitalTwinsImpl.invokeComponentCommandWithServiceResponseAsync(String id, String componentPath, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Parameters:

id - the String value
componentPath - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeRootLevelCommand

public Object invokeRootLevelCommand(String id, String commandName)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommand(String id, String commandName)

Parameters:

id - the String value
commandName - the String value

Returns:

the Object object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

invokeRootLevelCommand

public Object invokeRootLevelCommand(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommand(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Parameters:

id - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Returns:

the Object object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

invokeRootLevelCommandAsync

public Observable invokeRootLevelCommandAsync(String id, String commandName)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommandAsync(String id, String commandName)

Parameters:

id - the String value
commandName - the String value

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeRootLevelCommandAsync

public ServiceFuture invokeRootLevelCommandAsync(String id, String commandName, final ServiceCallback serviceCallback)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommandAsync(String id, String commandName, final ServiceCallback<Object> serviceCallback)

Parameters:

id - the String value
commandName - the String value
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeRootLevelCommandAsync

public Observable invokeRootLevelCommandAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommandAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Parameters:

id - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeRootLevelCommandAsync

public ServiceFuture invokeRootLevelCommandAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds, final ServiceCallback serviceCallback)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommandAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds, final ServiceCallback<Object> serviceCallback)

Parameters:

id - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeRootLevelCommandWithServiceResponseAsync

public Observable> invokeRootLevelCommandWithServiceResponseAsync(String id, String commandName)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommandWithServiceResponseAsync(String id, String commandName)

Parameters:

id - the String value
commandName - the String value

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

invokeRootLevelCommandWithServiceResponseAsync

public Observable> invokeRootLevelCommandWithServiceResponseAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Invoke a digital twin root level command. Invoke a digital twin root level command.

Overrides:

DigitalTwinsImpl.invokeRootLevelCommandWithServiceResponseAsync(String id, String commandName, Object payload, Integer connectTimeoutInSeconds, Integer responseTimeoutInSeconds)

Parameters:

id - the String value
commandName - the String value
payload - the Object value
connectTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.
responseTimeoutInSeconds - Maximum interval of time, in seconds, that the digital twin command will wait for the answer.

Returns:

the observable to the Object object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateDigitalTwin

public void updateDigitalTwin(String id, List digitalTwinPatch)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwin(String id, List<Object> digitalTwinPatch)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

updateDigitalTwin

public void updateDigitalTwin(String id, List digitalTwinPatch, String ifMatch)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwin(String id, List<Object> digitalTwinPatch, String ifMatch)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.
ifMatch - the String value

Throws:

IllegalArgumentException - thrown if parameters fail the validation
RestException - thrown if the request is rejected by server
RuntimeException - all other wrapped checked exceptions if the request fails to be sent

updateDigitalTwinAsync

public Observable updateDigitalTwinAsync(String id, List digitalTwinPatch)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateDigitalTwinAsync

public ServiceFuture updateDigitalTwinAsync(String id, List digitalTwinPatch, final ServiceCallback serviceCallback)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch, final ServiceCallback<Void> serviceCallback)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateDigitalTwinAsync

public Observable updateDigitalTwinAsync(String id, List digitalTwinPatch, String ifMatch)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch, String ifMatch)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.
ifMatch - the String value

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateDigitalTwinAsync

public ServiceFuture updateDigitalTwinAsync(String id, List digitalTwinPatch, String ifMatch, final ServiceCallback serviceCallback)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwinAsync(String id, List<Object> digitalTwinPatch, String ifMatch, final ServiceCallback<Void> serviceCallback)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.
ifMatch - the String value
serviceCallback - the async ServiceCallback to handle successful and failed responses.

Returns:

the ServiceFuture object

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateDigitalTwinWithServiceResponseAsync

public Observable> updateDigitalTwinWithServiceResponseAsync(String id, List digitalTwinPatch)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwinWithServiceResponseAsync(String id, List<Object> digitalTwinPatch)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

updateDigitalTwinWithServiceResponseAsync

public Observable> updateDigitalTwinWithServiceResponseAsync(String id, List digitalTwinPatch, String ifMatch)

Updates a digital twin.

Overrides:

DigitalTwinsImpl.updateDigitalTwinWithServiceResponseAsync(String id, List<Object> digitalTwinPatch, String ifMatch)

Parameters:

id - Digital Twin ID.
digitalTwinPatch - json-patch contents to update.
ifMatch - the String value

Returns:

the ServiceResponseWithHeaders object if successful.

Throws:

IllegalArgumentException - thrown if parameters fail the validation

Applies to