Class WeatherDataAsyncClient

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

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

    • getWithResponse

      public Mono<com.azure.core.http.rest.Response<com.azure.core.util.BinaryData>> getWithResponse(com.azure.core.util.BinaryData weatherDataProviderRequest, com.azure.core.http.rest.RequestOptions requestOptions)
      Returns a list of WeatherData.

      Request Body Schema

      
       {
           locations (Optional): [
                (Optional){
                   type: String(LatLong/IataCode/IcaoCode/PlaceId/PostalKey) (Required)
                   value: String (Required)
               }
           ]
           providerAppId: String (Optional)
           providerApiKey: String (Required)
           extensionId: String (Required)
           extensionApiName: String (Required)
           language: String (Optional)
           startTimeHours: Integer (Optional)
           endTimeHours: Integer (Optional)
           duration: Integer (Optional)
           units: String (Required)
           additionalParams (Optional): {
               iconResolution: String (Optional)
               details: Boolean (Optional)
           }
       }
       

      Response Body Schema

      
       {
           weatherMetadata (Required): {
               extensionVersion: String (Required)
               weatherDataType: String (Required)
               extensionId: String (Required)
               extensionApiName: String (Required)
               language: String (Optional)
               startTimeHours: Integer (Optional)
               endTimeHours: Integer (Optional)
               duration: Integer (Optional)
               units: String (Required)
               additionalParams (Optional): {
                   iconResolution: String (Optional)
                   details: Boolean (Optional)
               }
           }
           status: String(Succeeded/Failed/PartiallySucceeded) (Optional)
           locations (Optional): [
                (Optional){
                   location (Optional): {
                       type: String(LatLong/IataCode/IcaoCode/PlaceId/PostalKey) (Required)
                       value: String (Required)
                   }
                   requestCompletionTime: String (Optional)
                   lastRefreshedDateTime: OffsetDateTime (Optional)
                   data (Optional): {
                       wetBulbTemperature (Optional): {
                           unit: String (Optional)
                           values (Optional): [
                               double (Optional)
                           ]
                       }
                       cloudCover (Optional): (recursive schema, see cloudCover above)
                       dayOfWeek (Optional): [
                           String (Optional)
                       ]
                       dayOrNight (Optional): [
                           String (Optional)
                       ]
                       expirationTime (Optional): [
                           String (Optional)
                       ]
                       iconCode (Optional): [
                           String (Optional)
                       ]
                       iconCodeExtend (Optional): [
                           String (Optional)
                       ]
                       hasPrecipitation (Optional): [
                           boolean (Optional)
                       ]
                       pressureMeanSeaLevel (Optional): (recursive schema, see pressureMeanSeaLevel above)
                       relativeHumidity (Optional): (recursive schema, see relativeHumidity above)
                       temperature (Optional): (recursive schema, see temperature above)
                       temperatureDewPoint (Optional): (recursive schema, see temperatureDewPoint above)
                       temperatureFeelsLike (Optional): (recursive schema, see temperatureFeelsLike above)
                       temperatureHeatIndex (Optional): (recursive schema, see temperatureHeatIndex above)
                       temperatureWindChill (Optional): (recursive schema, see temperatureWindChill above)
                       uvDescription (Optional): [
                           String (Optional)
                       ]
                       uvIndex (Optional): [
                           String (Optional)
                       ]
                       validTimeLocal (Optional): [
                           String (Optional)
                       ]
                       validTime (Optional): [
                           String (Optional)
                       ]
                       visibility (Optional): (recursive schema, see visibility above)
                       windDirection (Optional): (recursive schema, see windDirection above)
                       windGust (Optional): (recursive schema, see windGust above)
                       windSpeed (Optional): (recursive schema, see windSpeed above)
                       wxPhraseLong (Optional): [
                           String (Optional)
                       ]
                       wxPhraseShort (Optional): [
                           String (Optional)
                       ]
                       additionalAttributes (Optional): {
                           String: Object (Optional)
                       }
                   }
               }
           ]
           errors (Optional): {
               locations (Optional): [
                    (Optional){
                       location (Optional): (recursive schema, see location above)
                       code: Integer (Optional)
                       description: String (Optional)
                       retryable: Boolean (Optional)
                   }
               ]
           }
       }
       
      Parameters:
      weatherDataProviderRequest - Weather data provider request.
      requestOptions - The options to configure the HTTP request before HTTP client sends it.
      Returns:
      schema of Weather Data Provider Response 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.