Class SensorsAsyncClient
java.lang.Object
com.azure.verticals.agrifood.farming.SensorsAsyncClient
Initializes a new instance of the asynchronous FarmBeatsClient type.
-
Method Summary
Modifier and TypeMethodDescriptionMono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
createOrUpdateWithResponse
(String sensorPartnerId, String sensorId, com.azure.core.util.BinaryData sensorDetails, com.azure.core.http.rest.RequestOptions requestOptions) Create a sensor entity.deleteWithResponse
(String sensorPartnerId, String sensorId, com.azure.core.http.rest.RequestOptions requestOptions) Deletes a sensor entity.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
getConnectionStringWithResponse
(String sensorPartnerId, String sensorId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a sensor connection string.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
getWithResponse
(String sensorPartnerId, String sensorId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a sensor entity.com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData>
Returns a paginated list of sensor resources.Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
renewConnectionStringWithResponse
(String sensorPartnerId, String sensorId, com.azure.core.util.BinaryData renewConnectionStringModel, com.azure.core.http.rest.RequestOptions requestOptions) Renews a sensor connection string.
-
Method Details
-
list
public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> list(String sensorPartnerId, com.azure.core.http.rest.RequestOptions requestOptions) Returns a paginated list of sensor resources.Query Parameters
Query Parameters Name Type Required Description sensorDataModelIds List<String> No Id's of the sensor data models. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.sensorMappingIds List<String> No Ids of the sensor mappings. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.deviceIds List<String> No Id's of the devices. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.ids List<String> No Ids of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.names List<String> No Names of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.propertyFilters List<String> No Filters on key-value pairs within the Properties object. eg. "{testKey} eq {testValue}". Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.statuses List<String> No Statuses of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String)
to add string to array.minCreatedDateTime OffsetDateTime No Minimum creation date of resource (inclusive). maxCreatedDateTime OffsetDateTime No Maximum creation date of resource (inclusive). minLastModifiedDateTime OffsetDateTime No Minimum last modified date of resource (inclusive). maxLastModifiedDateTime OffsetDateTime No Maximum last modified date of resource (inclusive). maxPageSize Integer No Maximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50. skipToken String No Skip token for getting next set of results. RequestOptions.addQueryParam(java.lang.String, java.lang.String)
Response Body Schema
{ sensorDataModelId: String (Optional) integrationId: String (Optional) hardwareId: String (Optional) deviceId: String (Optional) type: String (Optional) location (Optional): { latitude: double (Required) longitude: double (Required) } port (Optional): { name: String (Optional) type: String (Optional) } depthInMeters (Optional): [ double (Optional) ] sensorPartnerId: String (Optional) id: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) eTag: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
- Parameters:
sensorPartnerId
- Id of the associated sensor partner.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- paged response contains list of requested objects and a URL link to get the next set of results as
paginated response with
PagedFlux
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
createOrUpdateWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> createOrUpdateWithResponse(String sensorPartnerId, String sensorId, com.azure.core.util.BinaryData sensorDetails, com.azure.core.http.rest.RequestOptions requestOptions) Create a sensor entity.Request Body Schema
{ sensorDataModelId: String (Optional) integrationId: String (Optional) hardwareId: String (Optional) deviceId: String (Optional) type: String (Optional) location (Optional): { latitude: double (Required) longitude: double (Required) } port (Optional): { name: String (Optional) type: String (Optional) } depthInMeters (Optional): [ double (Optional) ] sensorPartnerId: String (Optional) id: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) eTag: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
Response Body Schema
{ sensorDataModelId: String (Optional) integrationId: String (Optional) hardwareId: String (Optional) deviceId: String (Optional) type: String (Optional) location (Optional): { latitude: double (Required) longitude: double (Required) } port (Optional): { name: String (Optional) type: String (Optional) } depthInMeters (Optional): [ double (Optional) ] sensorPartnerId: String (Optional) id: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) eTag: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
- Parameters:
sensorPartnerId
- Id of the sensor partner.sensorId
- Id of the sensor resource.sensorDetails
- Sensor object details.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- sensor API model along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getWithResponse(String sensorPartnerId, String sensorId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a sensor entity.Response Body Schema
{ sensorDataModelId: String (Optional) integrationId: String (Optional) hardwareId: String (Optional) deviceId: String (Optional) type: String (Optional) location (Optional): { latitude: double (Required) longitude: double (Required) } port (Optional): { name: String (Optional) type: String (Optional) } depthInMeters (Optional): [ double (Optional) ] sensorPartnerId: String (Optional) id: String (Optional) status: String (Optional) createdDateTime: OffsetDateTime (Optional) modifiedDateTime: OffsetDateTime (Optional) eTag: String (Optional) name: String (Optional) description: String (Optional) createdBy: String (Optional) modifiedBy: String (Optional) properties (Optional): { String: Object (Optional) } }
- Parameters:
sensorPartnerId
- Id of the sensor partner.sensorId
- Id of the sensor resource.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a sensor entity along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
deleteWithResponse
public Mono<com.azure.core.http.rest.Response<Void>> deleteWithResponse(String sensorPartnerId, String sensorId, com.azure.core.http.rest.RequestOptions requestOptions) Deletes a sensor entity.- Parameters:
sensorPartnerId
- Id of the sensor partner.sensorId
- Id of the sensor resource.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- the
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
getConnectionStringWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getConnectionStringWithResponse(String sensorPartnerId, String sensorId, com.azure.core.http.rest.RequestOptions requestOptions) Gets a sensor connection string.Response Body Schema
{ primaryDeviceConnectionString: String (Optional) secondaryDeviceConnectionString: String (Optional) }
- Parameters:
sensorPartnerId
- Id of the sensor partner.sensorId
- Id of the sensor resource.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- a sensor connection string along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-
renewConnectionStringWithResponse
public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> renewConnectionStringWithResponse(String sensorPartnerId, String sensorId, com.azure.core.util.BinaryData renewConnectionStringModel, com.azure.core.http.rest.RequestOptions requestOptions) Renews a sensor connection string.Request Body Schema
{ connectionStringType: String(Primary/Secondary/Both) (Required) }
Response Body Schema
{ primaryDeviceConnectionString: String (Optional) secondaryDeviceConnectionString: String (Optional) }
- Parameters:
sensorPartnerId
- Id of the sensor partner.sensorId
- Id of the sensor resource.renewConnectionStringModel
- Sensor's connection string model.requestOptions
- The options to configure the HTTP request before HTTP client sends it.- Returns:
- authentication via connection string to IoTHub devices along with
Response
on successful completion ofMono
. - Throws:
com.azure.core.exception.HttpResponseException
- thrown if the request is rejected by server.com.azure.core.exception.ClientAuthenticationException
- thrown if the request is rejected by server on status code 401.com.azure.core.exception.ResourceNotFoundException
- thrown if the request is rejected by server on status code 404.com.azure.core.exception.ResourceModifiedException
- thrown if the request is rejected by server on status code 409.
-