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

package com.azure.resourcemanager.notificationhubs.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.notificationhubs.fluent.models.CheckAvailabilityResultInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.DebugSendResponseInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.NotificationHubResourceInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.PnsCredentialsResourceInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.ResourceListKeysInner;
import com.azure.resourcemanager.notificationhubs.fluent.models.SharedAccessAuthorizationRuleResourceInner;
import com.azure.resourcemanager.notificationhubs.models.CheckAvailabilityParameters;
import com.azure.resourcemanager.notificationhubs.models.NotificationHubCreateOrUpdateParameters;
import com.azure.resourcemanager.notificationhubs.models.NotificationHubPatchParameters;
import com.azure.resourcemanager.notificationhubs.models.PolicykeyResource;
import com.azure.resourcemanager.notificationhubs.models.SharedAccessAuthorizationRuleCreateOrUpdateParameters;

/** An instance of this class provides access to all the operations defined in NotificationHubsClient. */
public interface NotificationHubsClient {
    /**
     * Checks the availability of the given notificationHub in a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param parameters The notificationHub name.
     * @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 description of a CheckAvailability resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CheckAvailabilityResultInner checkNotificationHubAvailability(
        String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters);

    /**
     * Checks the availability of the given notificationHub in a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param parameters The notificationHub name.
     * @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 description of a CheckAvailability resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<CheckAvailabilityResultInner> checkNotificationHubAvailabilityWithResponse(
        String resourceGroupName, String namespaceName, CheckAvailabilityParameters parameters, Context context);

    /**
     * Creates/Update a NotificationHub in a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param parameters Parameters supplied to the create/update a NotificationHub Resource.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NotificationHubResourceInner createOrUpdate(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        NotificationHubCreateOrUpdateParameters parameters);

    /**
     * Creates/Update a NotificationHub in a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param parameters Parameters supplied to the create/update a NotificationHub Resource.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NotificationHubResourceInner> createOrUpdateWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        NotificationHubCreateOrUpdateParameters parameters,
        Context context);

    /**
     * Patch a NotificationHub in a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NotificationHubResourceInner patch(String resourceGroupName, String namespaceName, String notificationHubName);

    /**
     * Patch a NotificationHub in a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param parameters Parameters supplied to patch a NotificationHub Resource.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NotificationHubResourceInner> patchWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        NotificationHubPatchParameters parameters,
        Context context);

    /**
     * Deletes a notification hub associated with a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String namespaceName, String notificationHubName);

    /**
     * Deletes a notification hub associated with a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(
        String resourceGroupName, String namespaceName, String notificationHubName, Context context);

    /**
     * Lists the notification hubs associated with a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    NotificationHubResourceInner get(String resourceGroupName, String namespaceName, String notificationHubName);

    /**
     * Lists the notification hubs associated with a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<NotificationHubResourceInner> getWithResponse(
        String resourceGroupName, String namespaceName, String notificationHubName, Context context);

    /**
     * test send a push notification.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    DebugSendResponseInner debugSend(String resourceGroupName, String namespaceName, String notificationHubName);

    /**
     * test send a push notification.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param parameters Debug send parameters.
     * @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 description of a NotificationHub Resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<DebugSendResponseInner> debugSendWithResponse(
        String resourceGroupName, String namespaceName, String notificationHubName, Object parameters, Context context);

    /**
     * Creates/Updates an authorization rule for a NotificationHub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName Authorization Rule Name.
     * @param parameters The shared access authorization rule.
     * @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 description of a Namespace AuthorizationRules.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SharedAccessAuthorizationRuleResourceInner createOrUpdateAuthorizationRule(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters);

    /**
     * Creates/Updates an authorization rule for a NotificationHub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName Authorization Rule Name.
     * @param parameters The shared access authorization rule.
     * @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 description of a Namespace AuthorizationRules.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SharedAccessAuthorizationRuleResourceInner> createOrUpdateAuthorizationRuleWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        SharedAccessAuthorizationRuleCreateOrUpdateParameters parameters,
        Context context);

    /**
     * Deletes a notificationHub authorization rule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName Authorization Rule Name.
     * @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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void deleteAuthorizationRule(
        String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName);

    /**
     * Deletes a notificationHub authorization rule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName Authorization Rule Name.
     * @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 response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteAuthorizationRuleWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        Context context);

    /**
     * Gets an authorization rule for a NotificationHub by name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName authorization rule name.
     * @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 an authorization rule for a NotificationHub by name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    SharedAccessAuthorizationRuleResourceInner getAuthorizationRule(
        String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName);

    /**
     * Gets an authorization rule for a NotificationHub by name.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName authorization rule name.
     * @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 an authorization rule for a NotificationHub by name.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<SharedAccessAuthorizationRuleResourceInner> getAuthorizationRuleWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        Context context);

    /**
     * Lists the notification hubs associated with a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @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 response of the List NotificationHub operation.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NotificationHubResourceInner> list(String resourceGroupName, String namespaceName);

    /**
     * Lists the notification hubs associated with a namespace.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @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 response of the List NotificationHub operation.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<NotificationHubResourceInner> list(String resourceGroupName, String namespaceName, Context context);

    /**
     * Gets the authorization rules for a NotificationHub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 authorization rules for a NotificationHub.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<SharedAccessAuthorizationRuleResourceInner> listAuthorizationRules(
        String resourceGroupName, String namespaceName, String notificationHubName);

    /**
     * Gets the authorization rules for a NotificationHub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 authorization rules for a NotificationHub.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<SharedAccessAuthorizationRuleResourceInner> listAuthorizationRules(
        String resourceGroupName, String namespaceName, String notificationHubName, Context context);

    /**
     * Gets the Primary and Secondary ConnectionStrings to the NotificationHub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
     * @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 Primary and Secondary ConnectionStrings to the NotificationHub.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ResourceListKeysInner listKeys(
        String resourceGroupName, String namespaceName, String notificationHubName, String authorizationRuleName);

    /**
     * Gets the Primary and Secondary ConnectionStrings to the NotificationHub.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
     * @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 Primary and Secondary ConnectionStrings to the NotificationHub.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ResourceListKeysInner> listKeysWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        Context context);

    /**
     * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
     * @param parameters Parameters supplied to regenerate the NotificationHub Authorization Rule Key.
     * @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 namespace/NotificationHub Connection String.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ResourceListKeysInner regenerateKeys(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        PolicykeyResource parameters);

    /**
     * Regenerates the Primary/Secondary Keys to the NotificationHub Authorization Rule.
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @param authorizationRuleName The connection string of the NotificationHub for the specified authorizationRule.
     * @param parameters Parameters supplied to regenerate the NotificationHub Authorization Rule Key.
     * @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 namespace/NotificationHub Connection String.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ResourceListKeysInner> regenerateKeysWithResponse(
        String resourceGroupName,
        String namespaceName,
        String notificationHubName,
        String authorizationRuleName,
        PolicykeyResource parameters,
        Context context);

    /**
     * Lists the PNS Credentials associated with a notification hub .
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 description of a NotificationHub PNS Credentials.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    PnsCredentialsResourceInner getPnsCredentials(
        String resourceGroupName, String namespaceName, String notificationHubName);

    /**
     * Lists the PNS Credentials associated with a notification hub .
     *
     * @param resourceGroupName The name of the resource group.
     * @param namespaceName The namespace name.
     * @param notificationHubName The notification hub name.
     * @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 description of a NotificationHub PNS Credentials.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<PnsCredentialsResourceInner> getPnsCredentialsWithResponse(
        String resourceGroupName, String namespaceName, String notificationHubName, Context context);
}
