Class DevicesAsyncClient

java.lang.Object
com.azure.verticals.agrifood.farming.DevicesAsyncClient

public final class DevicesAsyncClient extends Object
Initializes a new instance of the asynchronous FarmBeatsClient type.
  • Method Summary

    Modifier and Type
    Method
    Description
    Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
    createOrUpdateWithResponse(String sensorPartnerId, String deviceId, com.azure.core.util.BinaryData deviceDetails, com.azure.core.http.rest.RequestOptions requestOptions)
    Create a device entity.
    Mono<com.azure.core.http.rest.Response<Void>>
    deleteWithResponse(String sensorPartnerId, String deviceId, com.azure.core.http.rest.RequestOptions requestOptions)
    Deletes a device entity.
    Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>>
    getWithResponse(String sensorPartnerId, String deviceId, com.azure.core.http.rest.RequestOptions requestOptions)
    Gets a device entity.
    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 device resources.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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 device resources.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      parentDeviceIdsList<String>NoId's of the parent devices. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String) to add string to array.
      deviceDataModelIdsList<String>NoId's of the device data models. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String) to add string to array.
      idsList<String>NoIds of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String) to add string to array.
      namesList<String>NoNames of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String) to add string to array.
      propertyFiltersList<String>NoFilters 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.
      statusesList<String>NoStatuses of the resource. Call RequestOptions.addQueryParam(java.lang.String, java.lang.String) to add string to array.
      minCreatedDateTimeOffsetDateTimeNoMinimum creation date of resource (inclusive).
      maxCreatedDateTimeOffsetDateTimeNoMaximum creation date of resource (inclusive).
      minLastModifiedDateTimeOffsetDateTimeNoMinimum last modified date of resource (inclusive).
      maxLastModifiedDateTimeOffsetDateTimeNoMaximum last modified date of resource (inclusive).
      maxPageSizeIntegerNoMaximum number of items needed (inclusive). Minimum = 10, Maximum = 1000, Default value = 50.
      skipTokenStringNoSkip token for getting next set of results.
      You can add these to a request with RequestOptions.addQueryParam(java.lang.String, java.lang.String)

      Response Body Schema

      
       {
           deviceDataModelId: String (Optional)
           integrationId: String (Optional)
           type: String (Optional)
           hardwareId: String (Optional)
           reportingIntervalInSeconds: Integer (Optional)
           parentDeviceId: String (Optional)
           location (Optional): {
               latitude: double (Required)
               longitude: double (Required)
           }
           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 deviceId, com.azure.core.util.BinaryData deviceDetails, com.azure.core.http.rest.RequestOptions requestOptions)
      Create a device entity.

      Request Body Schema

      
       {
           deviceDataModelId: String (Optional)
           integrationId: String (Optional)
           type: String (Optional)
           hardwareId: String (Optional)
           reportingIntervalInSeconds: Integer (Optional)
           parentDeviceId: String (Optional)
           location (Optional): {
               latitude: double (Required)
               longitude: double (Required)
           }
           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

      
       {
           deviceDataModelId: String (Optional)
           integrationId: String (Optional)
           type: String (Optional)
           hardwareId: String (Optional)
           reportingIntervalInSeconds: Integer (Optional)
           parentDeviceId: String (Optional)
           location (Optional): {
               latitude: double (Required)
               longitude: double (Required)
           }
           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.
      deviceId - Id of the device resource.
      deviceDetails - Device object details.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      device API model along with Response on successful completion of Mono.
      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 deviceId, com.azure.core.http.rest.RequestOptions requestOptions)
      Gets a device entity.

      Response Body Schema

      
       {
           deviceDataModelId: String (Optional)
           integrationId: String (Optional)
           type: String (Optional)
           hardwareId: String (Optional)
           reportingIntervalInSeconds: Integer (Optional)
           parentDeviceId: String (Optional)
           location (Optional): {
               latitude: double (Required)
               longitude: double (Required)
           }
           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.
      deviceId - Id of the device resource.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      a device entity along with Response on successful completion of Mono.
      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 deviceId, com.azure.core.http.rest.RequestOptions requestOptions)
      Deletes a device entity.
      Parameters:
      sensorPartnerId - Id of the sensor partner.
      deviceId - Id of the device resource.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the Response on successful completion of Mono.
      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.