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

package com.azure.resourcemanager.selfhelp.models;

import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;

/** Resource collection API of Diagnostics. */
public interface Diagnostics {
    /**
     * This API is used to check the uniqueness of a resource name used for a diagnostic check.
     *
     * @param scope This is an extension resource provider and only resource level extension is supported at the moment.
     * @param checkNameAvailabilityRequest The required parameters for availability check.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response for whether the requested resource name is available or not along with {@link Response}.
     */
    Response<CheckNameAvailabilityResponse> checkNameAvailabilityWithResponse(
        String scope, CheckNameAvailabilityRequest checkNameAvailabilityRequest, Context context);

    /**
     * This API is used to check the uniqueness of a resource name used for a diagnostic check.
     *
     * @param scope This is an extension resource provider and only resource level extension is supported at the moment.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return response for whether the requested resource name is available or not.
     */
    CheckNameAvailabilityResponse checkNameAvailability(String scope);

    /**
     * Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
     *
     * @param scope This is an extension resource provider and only resource level extension is supported at the moment.
     * @param diagnosticsResourceName Unique resource name for insight resources.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic along with
     *     {@link Response}.
     */
    Response<DiagnosticResource> getWithResponse(String scope, String diagnosticsResourceName, Context context);

    /**
     * Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
     *
     * @param scope This is an extension resource provider and only resource level extension is supported at the moment.
     * @param diagnosticsResourceName Unique resource name for insight resources.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
     */
    DiagnosticResource get(String scope, String diagnosticsResourceName);

    /**
     * Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
     *
     * @param id the resource ID.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic along with
     *     {@link Response}.
     */
    DiagnosticResource getById(String id);

    /**
     * Get the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic.
     *
     * @param id the resource ID.
     * @param context The context to associate with this operation.
     * @throws IllegalArgumentException thrown if parameters fail the validation.
     * @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
     * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
     * @return the diagnostics using the 'diagnosticsResourceName' you chose while creating the diagnostic along with
     *     {@link Response}.
     */
    Response<DiagnosticResource> getByIdWithResponse(String id, Context context);

    /**
     * Begins definition for a new DiagnosticResource resource.
     *
     * @param name resource name.
     * @return the first stage of the new DiagnosticResource definition.
     */
    DiagnosticResource.DefinitionStages.Blank define(String name);
}
