// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for
// license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.

package com.azure.quantum.jobs;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.quantum.jobs.implementation.ProvidersImpl;
import com.azure.quantum.jobs.models.ProviderStatus;
import com.azure.quantum.jobs.models.RestErrorException;

/** Initializes a new instance of the synchronous QuantumClient type. */
@ServiceClient(builder = QuantumClientBuilder.class)
public final class ProvidersClient {
    private final ProvidersImpl serviceClient;

    /**
     * Initializes an instance of Providers client.
     *
     * @param serviceClient the service client implementation.
     */
    ProvidersClient(ProvidersImpl serviceClient) {
        this.serviceClient = serviceClient;
    }

    /**
     * Get provider status.
     *
     * @throws RestErrorException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return provider status.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    public PagedIterable<ProviderStatus> getStatus() {
        return this.serviceClient.getStatus();
    }
}
