// 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.implementation;

import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.Get;
import com.azure.core.annotation.HeaderParam;
import com.azure.core.annotation.Host;
import com.azure.core.annotation.HostParam;
import com.azure.core.annotation.PathParam;
import com.azure.core.annotation.Put;
import com.azure.core.annotation.QueryParam;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceInterface;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.annotation.UnexpectedResponseExceptionType;
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.http.rest.RestProxy;
import com.azure.core.util.BinaryData;
import com.azure.core.util.Context;
import com.azure.core.util.FluxUtil;
import com.azure.core.util.polling.DefaultPollingStrategy;
import com.azure.core.util.polling.PollerFlux;
import com.azure.core.util.polling.SyncPoller;
import com.azure.core.util.serializer.TypeReference;
import java.time.Duration;
import reactor.core.publisher.Mono;

/** An instance of this class provides access to all the operations defined in ModelInferences. */
public final class ModelInferencesImpl {
    /** The proxy service used to perform REST calls. */
    private final ModelInferencesService service;

    /** The service client containing this operation class. */
    private final FarmBeatsClientImpl client;

    /**
     * Initializes an instance of ModelInferencesImpl.
     *
     * @param client the instance of the service client containing this operation class.
     */
    ModelInferencesImpl(FarmBeatsClientImpl client) {
        this.service =
                RestProxy.create(ModelInferencesService.class, client.getHttpPipeline(), client.getSerializerAdapter());
        this.client = client;
    }

    /**
     * The interface defining all the services for FarmBeatsClientModelInferences to be used by the proxy service to
     * perform REST calls.
     */
    @Host("{endpoint}")
    @ServiceInterface(name = "FarmBeatsClientModel")
    public interface ModelInferencesService {
        @Put("/model-inference/models/microsoft-biomass/infer-data/{jobId}")
        @ExpectedResponses({202})
        @UnexpectedResponseExceptionType(
                value = ClientAuthenticationException.class,
                code = {401})
        @UnexpectedResponseExceptionType(
                value = ResourceNotFoundException.class,
                code = {404})
        @UnexpectedResponseExceptionType(
                value = ResourceModifiedException.class,
                code = {409})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<Response<BinaryData>> createBiomassModelJob(
                @HostParam("endpoint") String endpoint,
                @PathParam("jobId") String jobId,
                @QueryParam("api-version") String apiVersion,
                @BodyParam("application/json") BinaryData job,
                @HeaderParam("Accept") String accept,
                RequestOptions requestOptions,
                Context context);

        @Get("/model-inference/models/microsoft-biomass/infer-data/{jobId}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ClientAuthenticationException.class,
                code = {401})
        @UnexpectedResponseExceptionType(
                value = ResourceNotFoundException.class,
                code = {404})
        @UnexpectedResponseExceptionType(
                value = ResourceModifiedException.class,
                code = {409})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<Response<BinaryData>> getBiomassModelJob(
                @HostParam("endpoint") String endpoint,
                @PathParam("jobId") String jobId,
                @QueryParam("api-version") String apiVersion,
                @HeaderParam("Accept") String accept,
                RequestOptions requestOptions,
                Context context);

        @Put("/model-inference/models/microsoft-sensor-placement/infer-data/{jobId}")
        @ExpectedResponses({202})
        @UnexpectedResponseExceptionType(
                value = ClientAuthenticationException.class,
                code = {401})
        @UnexpectedResponseExceptionType(
                value = ResourceNotFoundException.class,
                code = {404})
        @UnexpectedResponseExceptionType(
                value = ResourceModifiedException.class,
                code = {409})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<Response<BinaryData>> createSensorPlacementModelJob(
                @HostParam("endpoint") String endpoint,
                @PathParam("jobId") String jobId,
                @QueryParam("api-version") String apiVersion,
                @BodyParam("application/json") BinaryData job,
                @HeaderParam("Accept") String accept,
                RequestOptions requestOptions,
                Context context);

        @Get("/model-inference/models/microsoft-sensor-placement/infer-data/{jobId}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ClientAuthenticationException.class,
                code = {401})
        @UnexpectedResponseExceptionType(
                value = ResourceNotFoundException.class,
                code = {404})
        @UnexpectedResponseExceptionType(
                value = ResourceModifiedException.class,
                code = {409})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<Response<BinaryData>> getSensorPlacementModelJob(
                @HostParam("endpoint") String endpoint,
                @PathParam("jobId") String jobId,
                @QueryParam("api-version") String apiVersion,
                @HeaderParam("Accept") String accept,
                RequestOptions requestOptions,
                Context context);

        @Put("/model-inference/models/microsoft-soil-moisture/infer-data/{jobId}")
        @ExpectedResponses({202})
        @UnexpectedResponseExceptionType(
                value = ClientAuthenticationException.class,
                code = {401})
        @UnexpectedResponseExceptionType(
                value = ResourceNotFoundException.class,
                code = {404})
        @UnexpectedResponseExceptionType(
                value = ResourceModifiedException.class,
                code = {409})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<Response<BinaryData>> createSoilMoistureModelJob(
                @HostParam("endpoint") String endpoint,
                @PathParam("jobId") String jobId,
                @QueryParam("api-version") String apiVersion,
                @BodyParam("application/json") BinaryData job,
                @HeaderParam("Accept") String accept,
                RequestOptions requestOptions,
                Context context);

        @Get("/model-inference/models/microsoft-soil-moisture/infer-data/{jobId}")
        @ExpectedResponses({200})
        @UnexpectedResponseExceptionType(
                value = ClientAuthenticationException.class,
                code = {401})
        @UnexpectedResponseExceptionType(
                value = ResourceNotFoundException.class,
                code = {404})
        @UnexpectedResponseExceptionType(
                value = ResourceModifiedException.class,
                code = {409})
        @UnexpectedResponseExceptionType(HttpResponseException.class)
        Mono<Response<BinaryData>> getSoilMoistureModelJob(
                @HostParam("endpoint") String endpoint,
                @PathParam("jobId") String jobId,
                @QueryParam("api-version") String apiVersion,
                @HeaderParam("Accept") String accept,
                RequestOptions requestOptions,
                Context context);
    }

    /**
     * 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 schema of biomass model job along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<BinaryData>> createBiomassModelJobWithResponseAsync(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.createBiomassModelJob(
                                this.client.getEndpoint(),
                                jobId,
                                this.client.getServiceVersion().getVersion(),
                                job,
                                accept,
                                requestOptions,
                                context));
    }

    /**
     * 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 PollerFlux} for polling of schema of biomass model job.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<BinaryData, BinaryData> beginCreateBiomassModelJobAsync(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.createBiomassModelJobWithResponseAsync(jobId, job, requestOptions),
                new DefaultPollingStrategy<>(
                        this.client.getHttpPipeline(),
                        "{endpoint}".replace("{endpoint}", this.client.getEndpoint()),
                        null,
                        requestOptions != null && requestOptions.getContext() != null
                                ? requestOptions.getContext()
                                : Context.NONE),
                TypeReference.createInstance(BinaryData.class),
                TypeReference.createInstance(BinaryData.class));
    }

    /**
     * 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.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateBiomassModelJob(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return this.beginCreateBiomassModelJobAsync(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} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getBiomassModelJobWithResponseAsync(String jobId, RequestOptions requestOptions) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getBiomassModelJob(
                                this.client.getEndpoint(),
                                jobId,
                                this.client.getServiceVersion().getVersion(),
                                accept,
                                requestOptions,
                                context));
    }

    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getBiomassModelJobWithResponse(String jobId, RequestOptions requestOptions) {
        return getBiomassModelJobWithResponseAsync(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 schema of sensor placement model job along with {@link Response} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<BinaryData>> createSensorPlacementModelJobWithResponseAsync(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.createSensorPlacementModelJob(
                                this.client.getEndpoint(),
                                jobId,
                                this.client.getServiceVersion().getVersion(),
                                job,
                                accept,
                                requestOptions,
                                context));
    }

    /**
     * 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 PollerFlux} for polling of schema of sensor placement model job.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<BinaryData, BinaryData> beginCreateSensorPlacementModelJobAsync(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.createSensorPlacementModelJobWithResponseAsync(jobId, job, requestOptions),
                new DefaultPollingStrategy<>(
                        this.client.getHttpPipeline(),
                        "{endpoint}".replace("{endpoint}", this.client.getEndpoint()),
                        null,
                        requestOptions != null && requestOptions.getContext() != null
                                ? requestOptions.getContext()
                                : Context.NONE),
                TypeReference.createInstance(BinaryData.class),
                TypeReference.createInstance(BinaryData.class));
    }

    /**
     * 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.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateSensorPlacementModelJob(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return this.beginCreateSensorPlacementModelJobAsync(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} on successful completion of {@link
     *     Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getSensorPlacementModelJobWithResponseAsync(
            String jobId, RequestOptions requestOptions) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getSensorPlacementModelJob(
                                this.client.getEndpoint(),
                                jobId,
                                this.client.getServiceVersion().getVersion(),
                                accept,
                                requestOptions,
                                context));
    }

    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getSensorPlacementModelJobWithResponse(String jobId, RequestOptions requestOptions) {
        return getSensorPlacementModelJobWithResponseAsync(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 schema of soil moisture model job along with {@link Response} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    private Mono<Response<BinaryData>> createSoilMoistureModelJobWithResponseAsync(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.createSoilMoistureModelJob(
                                this.client.getEndpoint(),
                                jobId,
                                this.client.getServiceVersion().getVersion(),
                                job,
                                accept,
                                requestOptions,
                                context));
    }

    /**
     * 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 PollerFlux} for polling of schema of soil moisture model job.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public PollerFlux<BinaryData, BinaryData> beginCreateSoilMoistureModelJobAsync(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return PollerFlux.create(
                Duration.ofSeconds(1),
                () -> this.createSoilMoistureModelJobWithResponseAsync(jobId, job, requestOptions),
                new DefaultPollingStrategy<>(
                        this.client.getHttpPipeline(),
                        "{endpoint}".replace("{endpoint}", this.client.getEndpoint()),
                        null,
                        requestOptions != null && requestOptions.getContext() != null
                                ? requestOptions.getContext()
                                : Context.NONE),
                TypeReference.createInstance(BinaryData.class),
                TypeReference.createInstance(BinaryData.class));
    }

    /**
     * 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.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    public SyncPoller<BinaryData, BinaryData> beginCreateSoilMoistureModelJob(
            String jobId, BinaryData job, RequestOptions requestOptions) {
        return this.beginCreateSoilMoistureModelJobAsync(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} on successful completion of {@link Mono}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Mono<Response<BinaryData>> getSoilMoistureModelJobWithResponseAsync(
            String jobId, RequestOptions requestOptions) {
        final String accept = "application/json";
        return FluxUtil.withContext(
                context ->
                        service.getSoilMoistureModelJob(
                                this.client.getEndpoint(),
                                jobId,
                                this.client.getServiceVersion().getVersion(),
                                accept,
                                requestOptions,
                                context));
    }

    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    public Response<BinaryData> getSoilMoistureModelJobWithResponse(String jobId, RequestOptions requestOptions) {
        return getSoilMoistureModelJobWithResponseAsync(jobId, requestOptions).block();
    }
}
