Class InsightsAsyncClient

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

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

    • beginCreateCascadeDeleteJob

      public com.azure.core.util.polling.PollerFlux<com.azure.core.util.BinaryData,com.azure.core.util.BinaryData> beginCreateCascadeDeleteJob(String jobId, String partyId, String modelId, String resourceType, String resourceId, String insightId, com.azure.core.http.rest.RequestOptions requestOptions)
      Create a cascade delete job for insights specified partyId/modelId/resourceType/resourceId.

      Response Body Schema

      
       {
           partyId: String (Required)
           resourceId: String (Required)
           resourceType: String (Required)
           id: String (Optional)
           status: String(Waiting/Running/Succeeded/Failed/Cancelled) (Optional)
           durationInSeconds: Double (Optional)
           message: String (Optional)
           errorCode: String (Optional)
           createdDateTime: OffsetDateTime (Optional)
           lastActionDateTime: OffsetDateTime (Optional)
           startTime: OffsetDateTime (Optional)
           endTime: OffsetDateTime (Optional)
       }
       
      Parameters:
      jobId - Job ID supplied by end user.
      partyId - ID of the associated party.
      modelId - Id of the associated model.
      resourceType - Resource Type.
      resourceId - Id of the associated resource.
      insightId - Insight id.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      the PollerFlux for polling of schema of cascade delete job.
      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.
    • getCascadeDeleteJobDetailsWithResponse

      public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getCascadeDeleteJobDetailsWithResponse(String jobId, com.azure.core.http.rest.RequestOptions requestOptions)
      Get a cascade delete job for specified insight.

      Response Body Schema

      
       {
           partyId: String (Required)
           resourceId: String (Required)
           resourceType: String (Required)
           id: String (Optional)
           status: String(Waiting/Running/Succeeded/Failed/Cancelled) (Optional)
           durationInSeconds: Double (Optional)
           message: String (Optional)
           errorCode: String (Optional)
           createdDateTime: OffsetDateTime (Optional)
           lastActionDateTime: OffsetDateTime (Optional)
           startTime: OffsetDateTime (Optional)
           endTime: OffsetDateTime (Optional)
       }
       
      Parameters:
      jobId - Id of the job.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      a cascade delete job for specified insight 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.
    • listByPartyIdModelIdAndResource

      public com.azure.core.http.rest.PagedFlux<com.azure.core.util.BinaryData> listByPartyIdModelIdAndResource(String partyId, String modelId, String resourceType, String resourceId, com.azure.core.http.rest.RequestOptions requestOptions)
      Returns a paginated list of insight resources.

      Query Parameters

      Query Parameters
      NameTypeRequiredDescription
      minInsightStartDateTimeOffsetDateTimeNoMinimum insightStartDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ.
      maxInsightStartDateTimeOffsetDateTimeNoMaximum insightStartDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ.
      minInsightEndDateTimeOffsetDateTimeNoMinimum insightEndDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ.
      maxInsightEndDateTimeOffsetDateTimeNoMaximum insightEndDateTime time of insight resources (inclusive), sample format: yyyy-MM-ddTHH:mm:ssZ.
      measurementFiltersList<String>NoFilters on measureKey.unit/unitValue or measureKey.value/value pairs within the Measures object. eg. "measureKey.unit eq {testValue}" where testValue is string. eg. "measureKey.value eq {testValue}" where testValue = double. 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

      
       {
           partyId: String (Optional)
           modelId: String (Optional)
           resourceType: String(Party/Farm/Field/SeasonalField/Boundary) (Optional)
           resourceId: String (Optional)
           modelVersion: String (Optional)
           attachmentsLink: String (Optional)
           insightStartDateTime: OffsetDateTime (Optional)
           insightEndDateTime: OffsetDateTime (Optional)
           measurements (Optional): {
               String (Optional): {
                   unit: String (Optional)
                   value: Double (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:
      partyId - Id of the associated party.
      modelId - Id of the associated model.
      resourceType - Resource type associated with the record.
      resourceId - Id of the associated resource.
      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 partyId, String modelId, String resourceType, String resourceId, String insightId, com.azure.core.util.BinaryData insightData, com.azure.core.http.rest.RequestOptions requestOptions)
      Creates or updates insight entity.

      Request Body Schema

      
       {
           partyId: String (Optional)
           modelId: String (Optional)
           resourceType: String(Party/Farm/Field/SeasonalField/Boundary) (Optional)
           resourceId: String (Optional)
           modelVersion: String (Optional)
           attachmentsLink: String (Optional)
           insightStartDateTime: OffsetDateTime (Optional)
           insightEndDateTime: OffsetDateTime (Optional)
           measurements (Optional): {
               String (Optional): {
                   unit: String (Optional)
                   value: Double (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

      
       {
           partyId: String (Optional)
           modelId: String (Optional)
           resourceType: String(Party/Farm/Field/SeasonalField/Boundary) (Optional)
           resourceId: String (Optional)
           modelVersion: String (Optional)
           attachmentsLink: String (Optional)
           insightStartDateTime: OffsetDateTime (Optional)
           insightEndDateTime: OffsetDateTime (Optional)
           measurements (Optional): {
               String (Optional): {
                   unit: String (Optional)
                   value: Double (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:
      partyId - Id of the associated party.
      modelId - Id of the associated model. It can be either 'BiomassModelId', 'SensorPlacementModelId', 'SoilMoistureModelId' or any solution id.
      resourceType - Resource type associated with the record.
      resourceId - Id of the associated resource.
      insightId - Id of the insight resource.
      insightData - Insight data.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      schema of insight resource 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 partyId, String modelId, String resourceType, String resourceId, String insightId, com.azure.core.http.rest.RequestOptions requestOptions)
      Gets a specified insight resource under a particular party.

      Response Body Schema

      
       {
           partyId: String (Optional)
           modelId: String (Optional)
           resourceType: String(Party/Farm/Field/SeasonalField/Boundary) (Optional)
           resourceId: String (Optional)
           modelVersion: String (Optional)
           attachmentsLink: String (Optional)
           insightStartDateTime: OffsetDateTime (Optional)
           insightEndDateTime: OffsetDateTime (Optional)
           measurements (Optional): {
               String (Optional): {
                   unit: String (Optional)
                   value: Double (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:
      partyId - Id of the associated party.
      modelId - Id of the associated model. It can be either 'BiomassModelId', 'SensorPlacementModelId', 'SoilMoistureModelId' or any solution id.
      resourceType - Resource type associated with the record.
      resourceId - Id of the associated resource.
      insightId - Id of the insight resource.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      a specified insight resource under a particular party 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 partyId, String modelId, String resourceType, String resourceId, String insightId, com.azure.core.http.rest.RequestOptions requestOptions)
      Deletes a specified insight resource.
      Parameters:
      partyId - Id of the associated party.
      modelId - Id of the associated model. It can be either 'BiomassModelId', 'SensorPlacementModelId', 'SoilMoistureModelId' or any solution id.
      resourceType - Resource type associated with the record.
      resourceId - Id of the associated resource.
      insightId - Id of the insight 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.