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

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.selfhelp.fluent.models.CheckNameAvailabilityResponseInner;
import com.azure.resourcemanager.selfhelp.fluent.models.DiagnosticResourceInner;
import com.azure.resourcemanager.selfhelp.models.CheckNameAvailabilityRequest;

/** An instance of this class provides access to all the operations defined in DiagnosticsClient. */
public interface DiagnosticsClient {
    /**
     * 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<CheckNameAvailabilityResponseInner> 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CheckNameAvailabilityResponseInner checkNameAvailability(String scope);

    /**
     * Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once
     * you discover and identify the relevant solution for your Azure issue.&lt;br/&gt;&lt;br/&gt; You can create
     * diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
     * &lt;br/&gt;&lt;br/&gt; &lt;b&gt;Note: &lt;/b&gt;‘requiredParameterSets’ from Solutions Discovery API response
     * must be passed via ‘additionalParameters’ as an input to Diagnostics API.
     *
     * @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 {@link SyncPoller} for polling of diagnostic resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DiagnosticResourceInner>, DiagnosticResourceInner> beginCreate(
        String scope, String diagnosticsResourceName);

    /**
     * Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once
     * you discover and identify the relevant solution for your Azure issue.&lt;br/&gt;&lt;br/&gt; You can create
     * diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
     * &lt;br/&gt;&lt;br/&gt; &lt;b&gt;Note: &lt;/b&gt;‘requiredParameterSets’ from Solutions Discovery API response
     * must be passed via ‘additionalParameters’ as an input to Diagnostics API.
     *
     * @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 diagnosticResourceRequest The required request body for this insightResource invocation.
     * @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 {@link SyncPoller} for polling of diagnostic resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<DiagnosticResourceInner>, DiagnosticResourceInner> beginCreate(
        String scope,
        String diagnosticsResourceName,
        DiagnosticResourceInner diagnosticResourceRequest,
        Context context);

    /**
     * Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once
     * you discover and identify the relevant solution for your Azure issue.&lt;br/&gt;&lt;br/&gt; You can create
     * diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
     * &lt;br/&gt;&lt;br/&gt; &lt;b&gt;Note: &lt;/b&gt;‘requiredParameterSets’ from Solutions Discovery API response
     * must be passed via ‘additionalParameters’ as an input to Diagnostics API.
     *
     * @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 diagnostic resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DiagnosticResourceInner create(String scope, String diagnosticsResourceName);

    /**
     * Diagnostics tells you precisely the root cause of the issue and how to address it. You can get diagnostics once
     * you discover and identify the relevant solution for your Azure issue.&lt;br/&gt;&lt;br/&gt; You can create
     * diagnostics using the ‘solutionId’ from Solution Discovery API response and ‘additionalParameters’
     * &lt;br/&gt;&lt;br/&gt; &lt;b&gt;Note: &lt;/b&gt;‘requiredParameterSets’ from Solutions Discovery API response
     * must be passed via ‘additionalParameters’ as an input to Diagnostics API.
     *
     * @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 diagnosticResourceRequest The required request body for this insightResource invocation.
     * @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 diagnostic resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DiagnosticResourceInner create(
        String scope,
        String diagnosticsResourceName,
        DiagnosticResourceInner diagnosticResourceRequest,
        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.
     * @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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DiagnosticResourceInner> 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DiagnosticResourceInner get(String scope, String diagnosticsResourceName);
}
