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

package com.azure.resourcemanager.communication.models;

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

/** Resource collection API of SenderUsernames. */
public interface SenderUsernames {
    /**
     * ListBy_Domains
     *
     * <p>List all valid sender usernames for a domains resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService resource.
     * @param domainName The name of the Domains 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 a class representing a Domains SenderUsernames collection as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SenderUsernameResource> listByDomains(
        String resourceGroupName, String emailServiceName, String domainName);

    /**
     * ListBy_Domains
     *
     * <p>List all valid sender usernames for a domains resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService resource.
     * @param domainName The name of the Domains 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 a class representing a Domains SenderUsernames collection as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SenderUsernameResource> listByDomains(
        String resourceGroupName, String emailServiceName, String domainName, Context context);

    /**
     * Get
     *
     * <p>Get a valid sender username for a domains resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService resource.
     * @param domainName The name of the Domains resource.
     * @param senderUsername The valid sender Username.
     * @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 a valid sender username for a domains resource along with {@link Response}.
     */
    Response<SenderUsernameResource> getWithResponse(
        String resourceGroupName, String emailServiceName, String domainName, String senderUsername, Context context);

    /**
     * Get
     *
     * <p>Get a valid sender username for a domains resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService resource.
     * @param domainName The name of the Domains resource.
     * @param senderUsername The valid sender Username.
     * @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 a valid sender username for a domains resource.
     */
    SenderUsernameResource get(
        String resourceGroupName, String emailServiceName, String domainName, String senderUsername);

    /**
     * Delete
     *
     * <p>Operation to delete a SenderUsernames resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService resource.
     * @param domainName The name of the Domains resource.
     * @param senderUsername The valid sender Username.
     * @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 Response}.
     */
    Response<Void> deleteWithResponse(
        String resourceGroupName, String emailServiceName, String domainName, String senderUsername, Context context);

    /**
     * Delete
     *
     * <p>Operation to delete a SenderUsernames resource.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService resource.
     * @param domainName The name of the Domains resource.
     * @param senderUsername The valid sender Username.
     * @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.
     */
    void delete(String resourceGroupName, String emailServiceName, String domainName, String senderUsername);

    /**
     * Get
     *
     * <p>Get a valid sender username for a domains resource.
     *
     * @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 a valid sender username for a domains resource along with {@link Response}.
     */
    SenderUsernameResource getById(String id);

    /**
     * Get
     *
     * <p>Get a valid sender username for a domains resource.
     *
     * @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 a valid sender username for a domains resource along with {@link Response}.
     */
    Response<SenderUsernameResource> getByIdWithResponse(String id, Context context);

    /**
     * Delete
     *
     * <p>Operation to delete a SenderUsernames resource.
     *
     * @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.
     */
    void deleteById(String id);

    /**
     * Delete
     *
     * <p>Operation to delete a SenderUsernames resource.
     *
     * @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 {@link Response}.
     */
    Response<Void> deleteByIdWithResponse(String id, Context context);

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