// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.verticals.agrifood.farming;

import com.azure.core.annotation.Generated;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.exception.ClientAuthenticationException;
import com.azure.core.exception.HttpResponseException;
import com.azure.core.exception.ResourceModifiedException;
import com.azure.core.exception.ResourceNotFoundException;
import com.azure.core.http.rest.RequestOptions;
import com.azure.core.http.rest.Response;
import com.azure.core.util.BinaryData;
import com.azure.core.util.polling.SyncPoller;

/** Initializes a new instance of the synchronous FarmBeatsClient type. */
@ServiceClient(builder = ModelInferenceClientBuilder.class)
public final class ModelInferenceClient {
    @Generated private final ModelInferenceAsyncClient client;

    /**
     * Initializes an instance of ModelInferenceClient class.
     *
     * @param client the async client.
     */
    @Generated
    ModelInferenceClient(ModelInferenceAsyncClient client) {
        this.client = client;
    }

    /**
     * Create a Biomass Model job.
     *
     * <p><strong>Request Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     modelVersion: String (Required)
     *     cropName: String(Corn) (Required)
     *     plantingStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     weatherExtensionId: String (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     imageResolution: double (Required)
     *     imageFormat: String(TIF) (Required)
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     modelVersion: String (Required)
     *     cropName: String(Corn) (Required)
     *     plantingStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     weatherExtensionId: String (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     imageResolution: double (Required)
     *     imageFormat: String(TIF) (Required)
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * @param jobId JobId provided by user.
     * @param job Job parameters supplied by user.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of schema of biomass model job.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateBiomassModelJob(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return this.client.beginCreateBiomassModelJob(jobId, job, requestOptions).getSyncPoller();
    }

    /**
     * Get Biomass Model job's details.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     modelVersion: String (Required)
     *     cropName: String(Corn) (Required)
     *     plantingStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     weatherExtensionId: String (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     imageResolution: double (Required)
     *     imageFormat: String(TIF) (Required)
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * @param jobId Id of the job.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return biomass Model job's details along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getBiomassModelJobWithResponse(String jobId, RequestOptions requestOptions) {
        return this.client.getBiomassModelJobWithResponse(jobId, requestOptions).block();
    }

    /**
     * Create a Sensor Placement Model job.
     *
     * <p><strong>Request Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     modelVersion: String (Required)
     *     inferenceStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     sensorType: String (Required)
     *     isRanked: boolean (Required)
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     modelVersion: String (Required)
     *     inferenceStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     sensorType: String (Required)
     *     isRanked: boolean (Required)
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * @param jobId JobId provided by user.
     * @param job Job parameters supplied by user.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of schema of sensor placement model job.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateSensorPlacementModelJob(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return this.client.beginCreateSensorPlacementModelJob(jobId, job, requestOptions).getSyncPoller();
    }

    /**
     * Get Sensor Placement Model job's details.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     modelVersion: String (Required)
     *     inferenceStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     sensorType: String (Required)
     *     isRanked: boolean (Required)
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * @param jobId Id of the job.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return sensor Placement Model job's details along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getSensorPlacementModelJobWithResponse(String jobId, RequestOptions requestOptions) {
        return this.client.getSensorPlacementModelJobWithResponse(jobId, requestOptions).block();
    }

    /**
     * Create a SoilMoisture Model job.
     *
     * <p><strong>Request Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     sensorDataModelId: String (Required)
     *     sensorPartnerId: String (Required)
     *     inferenceStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     imageResolution: double (Required)
     *     imageFormat: String(TIF) (Required)
     *     modelVersion: String (Required)
     *     sensorDefinition (Required): {
     *         sensorMeasurement: String (Required)
     *         minProperty: String (Required)
     *         maxProperty: String (Required)
     *     }
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     sensorDataModelId: String (Required)
     *     sensorPartnerId: String (Required)
     *     inferenceStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     imageResolution: double (Required)
     *     imageFormat: String(TIF) (Required)
     *     modelVersion: String (Required)
     *     sensorDefinition (Required): {
     *         sensorMeasurement: String (Required)
     *         minProperty: String (Required)
     *         maxProperty: String (Required)
     *     }
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * @param jobId JobId provided by user.
     * @param job Job parameters supplied by user.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return the {@link SyncPoller} for polling of schema of soil moisture model job.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateSoilMoistureModelJob(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return this.client.beginCreateSoilMoistureModelJob(jobId, job, requestOptions).getSyncPoller();
    }

    /**
     * Get SoilMoisture Model job's details.
     *
     * <p><strong>Response Body Schema</strong>
     *
     * <pre>{@code
     * {
     *     partyId: String (Required)
     *     boundaryId: String (Required)
     *     sensorDataModelId: String (Required)
     *     sensorPartnerId: String (Required)
     *     inferenceStartDateTime: OffsetDateTime (Required)
     *     inferenceEndDateTime: OffsetDateTime (Required)
     *     satelliteProvider: String(Microsoft) (Required)
     *     satelliteSource: String(Sentinel_2_L2A/Sentinel_2_L1C) (Required)
     *     imageResolution: double (Required)
     *     imageFormat: String(TIF) (Required)
     *     modelVersion: String (Required)
     *     sensorDefinition (Required): {
     *         sensorMeasurement: String (Required)
     *         minProperty: String (Required)
     *         maxProperty: String (Required)
     *     }
     *     id: String (Optional)
     *     status: String (Optional)
     *     durationInSeconds: Double (Optional)
     *     message: String (Optional)
     *     errorCode: String (Optional)
     *     createdDateTime: OffsetDateTime (Optional)
     *     lastActionDateTime: OffsetDateTime (Optional)
     *     startTime: OffsetDateTime (Optional)
     *     endTime: OffsetDateTime (Optional)
     *     name: String (Optional)
     *     description: String (Optional)
     *     createdBy: String (Optional)
     *     modifiedBy: String (Optional)
     *     properties (Optional): {
     *         String: Object (Optional)
     *     }
     * }
     * }</pre>
     *
     * @param jobId Id of the job.
     * @param requestOptions The options to configure the HTTP request before HTTP client sends it.
     * @throws HttpResponseException thrown if the request is rejected by server.
     * @throws ClientAuthenticationException thrown if the request is rejected by server on status code 401.
     * @throws ResourceNotFoundException thrown if the request is rejected by server on status code 404.
     * @throws ResourceModifiedException thrown if the request is rejected by server on status code 409.
     * @return soilMoisture Model job's details along with {@link Response}.
     */
    @Generated
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getSoilMoistureModelJobWithResponse(String jobId, RequestOptions requestOptions) {
        return this.client.getSoilMoistureModelJobWithResponse(jobId, requestOptions).block();
    }
}
