Class DevicesClient
- java.lang.Object
-
- com.chrt.api.resources.tracking.devices.DevicesClient
-
public class DevicesClient extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description protected ClientOptionsclientOptions
-
Constructor Summary
Constructors Constructor Description DevicesClient(ClientOptions clientOptions)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleandeleteV1()Deletes a device by ID or MAC address.booleandeleteV1(DevicesDeleteV1Request request)Deletes a device by ID or MAC address.booleandeleteV1(DevicesDeleteV1Request request, RequestOptions requestOptions)Deletes a device by ID or MAC address.Device1getV1()Retrieves a single device by its MAC address or ID.Device1getV1(DevicesGetV1Request request)Retrieves a single device by its MAC address or ID.Device1getV1(DevicesGetV1Request request, RequestOptions requestOptions)Retrieves a single device by its MAC address or ID.booleanlinkToCargoV1(DevicesLinkToCargoV1Request request)Links a device to cargo with bidirectional references.booleanlinkToCargoV1(DevicesLinkToCargoV1Request request, RequestOptions requestOptions)Links a device to cargo with bidirectional references.java.util.List<Device1>listV1()Returns all tracking devices registered to the caller's organization.java.util.List<Device1>listV1(RequestOptions requestOptions)Returns all tracking devices registered to the caller's organization.java.lang.StringregisterToOrgV1(DevicesRegisterToOrgReq1 request)Registers a tracking device to the caller's organization.java.lang.StringregisterToOrgV1(DevicesRegisterToOrgReq1 request, RequestOptions requestOptions)Registers a tracking device to the caller's organization.booleanunlinkFromCargoV1(DevicesUnlinkFromCargoV1Request request)Unlinks a device from its linked cargo, removing the bidirectional reference.booleanunlinkFromCargoV1(DevicesUnlinkFromCargoV1Request request, RequestOptions requestOptions)Unlinks a device from its linked cargo, removing the bidirectional reference.booleanupdateV1()Updates a device's type and/or comments.booleanupdateV1(DevicesUpdateRequest1 request)Updates a device's type and/or comments.booleanupdateV1(DevicesUpdateRequest1 request, RequestOptions requestOptions)Updates a device's type and/or comments.RawDevicesClientwithRawResponse()Get responses with HTTP metadata like headers
-
-
-
Field Detail
-
clientOptions
protected final ClientOptions clientOptions
-
-
Constructor Detail
-
DevicesClient
public DevicesClient(ClientOptions clientOptions)
-
-
Method Detail
-
withRawResponse
public RawDevicesClient withRawResponse()
Get responses with HTTP metadata like headers
-
registerToOrgV1
public java.lang.String registerToOrgV1(DevicesRegisterToOrgReq1 request)
Registers a tracking device to the caller's organization. If device is already registered to a different organization, registration is blocked. | (DevicesRegisterToOrgReq1) -> (PydanticObjectId)
-
registerToOrgV1
public java.lang.String registerToOrgV1(DevicesRegisterToOrgReq1 request, RequestOptions requestOptions)
Registers a tracking device to the caller's organization. If device is already registered to a different organization, registration is blocked. | (DevicesRegisterToOrgReq1) -> (PydanticObjectId)
-
updateV1
public boolean updateV1()
Updates a device's type and/or comments. Can update one or both fields, or delete them by setting delete flags. | (DevicesUpdateRequest1) -> (bool)
-
updateV1
public boolean updateV1(DevicesUpdateRequest1 request)
Updates a device's type and/or comments. Can update one or both fields, or delete them by setting delete flags. | (DevicesUpdateRequest1) -> (bool)
-
updateV1
public boolean updateV1(DevicesUpdateRequest1 request, RequestOptions requestOptions)
Updates a device's type and/or comments. Can update one or both fields, or delete them by setting delete flags. | (DevicesUpdateRequest1) -> (bool)
-
deleteV1
public boolean deleteV1()
Deletes a device by ID or MAC address. Device must be unlinked from any session or cargo before deletion. | () -> (bool)
-
deleteV1
public boolean deleteV1(DevicesDeleteV1Request request)
Deletes a device by ID or MAC address. Device must be unlinked from any session or cargo before deletion. | () -> (bool)
-
deleteV1
public boolean deleteV1(DevicesDeleteV1Request request, RequestOptions requestOptions)
Deletes a device by ID or MAC address. Device must be unlinked from any session or cargo before deletion. | () -> (bool)
-
linkToCargoV1
public boolean linkToCargoV1(DevicesLinkToCargoV1Request request)
Links a device to cargo with bidirectional references. Device must not already be linked to a session or different cargo. | () -> (bool)
-
linkToCargoV1
public boolean linkToCargoV1(DevicesLinkToCargoV1Request request, RequestOptions requestOptions)
Links a device to cargo with bidirectional references. Device must not already be linked to a session or different cargo. | () -> (bool)
-
unlinkFromCargoV1
public boolean unlinkFromCargoV1(DevicesUnlinkFromCargoV1Request request)
Unlinks a device from its linked cargo, removing the bidirectional reference. Returns false if device is not linked to any cargo. | () -> (bool)
-
unlinkFromCargoV1
public boolean unlinkFromCargoV1(DevicesUnlinkFromCargoV1Request request, RequestOptions requestOptions)
Unlinks a device from its linked cargo, removing the bidirectional reference. Returns false if device is not linked to any cargo. | () -> (bool)
-
getV1
public Device1 getV1()
Retrieves a single device by its MAC address or ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Device1)
-
getV1
public Device1 getV1(DevicesGetV1Request request)
Retrieves a single device by its MAC address or ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Device1)
-
getV1
public Device1 getV1(DevicesGetV1Request request, RequestOptions requestOptions)
Retrieves a single device by its MAC address or ID. Access restricted to the caller's organization. | authz: min_org_role=operator | () -> (Device1)
-
listV1
public java.util.List<Device1> listV1()
Returns all tracking devices registered to the caller's organization. | authz: min_org_role=operator | () -> (list[Device1])
-
listV1
public java.util.List<Device1> listV1(RequestOptions requestOptions)
Returns all tracking devices registered to the caller's organization. | authz: min_org_role=operator | () -> (list[Device1])
-
-