public class LocationsClient extends MindsphereAPIClient
Modifier and Type | Class and Description |
---|---|
static class |
LocationsClient.ClientBuilder |
MindsphereAPIClient.Builder<T extends MindsphereAPIClient.Builder<T>>
credentials, restClientConfig, restTemplate
Constructor and Description |
---|
LocationsClient(LocationsClient.ClientBuilder builder) |
Modifier and Type | Method and Description |
---|---|
static LocationsClient.ClientBuilder |
builder() |
AssetResourceWithHierarchyPath |
deleteAssetLocation(DeleteAssetLocationRequest requestObject)
Delete location assigned to given asset.
|
AssetResourceWithHierarchyPath |
deleteAssetLocation(String ifMatch,
String id)
Delete location assigned to given asset.
|
void |
saveAssetLocation(SaveAssetLocationRequest requestObject)
Create or Update location assigned to given asset
* If the given asset has own location, this endpoint will update that location.
|
void |
saveAssetLocation(String ifMatch,
String id,
Location location)
Create or Update location assigned to given asset * If the given asset has
own location, this endpoint will update that location.
|
public LocationsClient(LocationsClient.ClientBuilder builder)
public static LocationsClient.ClientBuilder builder()
public AssetResourceWithHierarchyPath deleteAssetLocation(DeleteAssetLocationRequest requestObject) throws MindsphereException
200 - Location has been successfully deleted
401 - User is not authenticated
403 - User is not authorized for request
404 - Asset not found with given asset identifier
409 - Location not assigned to the given asset
500 - Server error, for more information see errorcode and message
requestObject
- - Object of type DeleteAssetLocationRequest {Parameters are If-Match*,id*}MindsphereException
- if an error occurs while attempting to invoke the APIpublic void saveAssetLocation(SaveAssetLocationRequest requestObject) throws MindsphereException
200 - Location has been successfully created or updated
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
404 - Asset not found with given asset identifier
412 - Location is changed in the background
500 - Server error, for more information see errorcode and message
requestObject
- - Object of type SaveAssetLocationRequest {Parameters are If-Match*,id*,location*}MindsphereException
- if an error occurs while attempting to invoke the APIpublic AssetResourceWithHierarchyPath deleteAssetLocation(String ifMatch, String id) throws MindsphereException
200 - Location has been successfully deleted
401 - User is not authenticated
403 - User is not authorized for request
404 - Asset not found with given asset identifier
409 - Location not assigned to the given asset
500 - Server error, for more information see errorcode and message
ifMatch
- Last known version to facilitate optimistic lockingid
- Unique identifierMindsphereException
- if an error occurs while attempting to invoke the APIpublic void saveAssetLocation(String ifMatch, String id, Location location) throws MindsphereException
200 - Location has been successfully created or updated
400 - Invalid request
401 - User is not authenticated
403 - User is not authorized for request
404 - Asset not found with given asset identifier
412 - Location is changed in the background
500 - Server error, for more information see errorcode and message
ifMatch
- Last known version to facilitate optimistic lockingid
- Unique identifierlocation
- locationMindsphereException
- if an error occurs while attempting to invoke the API