// 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;
import java.util.List;

/** Resource collection API of EmailServices. */
public interface EmailServices {
    /**
     * Get
     *
     * <p>Get the EmailService and its properties.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService 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 the EmailService and its properties along with {@link Response}.
     */
    Response<EmailServiceResource> getByResourceGroupWithResponse(
        String resourceGroupName, String emailServiceName, Context context);

    /**
     * Get
     *
     * <p>Get the EmailService and its properties.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param emailServiceName The name of the EmailService 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 the EmailService and its properties.
     */
    EmailServiceResource getByResourceGroup(String resourceGroupName, String emailServiceName);

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

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

    /**
     * List By Subscription
     *
     * <p>Handles requests to list all resources in a subscription.
     *
     * @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 object that includes an array of EmailServices and a possible link for next set as paginated response
     *     with {@link PagedIterable}.
     */
    PagedIterable<EmailServiceResource> list();

    /**
     * List By Subscription
     *
     * <p>Handles requests to list all resources in a subscription.
     *
     * @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 object that includes an array of EmailServices and a possible link for next set as paginated response
     *     with {@link PagedIterable}.
     */
    PagedIterable<EmailServiceResource> list(Context context);

    /**
     * List By Resource Group
     *
     * <p>Handles requests to list all resources in a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 object that includes an array of EmailServices and a possible link for next set as paginated response
     *     with {@link PagedIterable}.
     */
    PagedIterable<EmailServiceResource> listByResourceGroup(String resourceGroupName);

    /**
     * List By Resource Group
     *
     * <p>Handles requests to list all resources in a resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @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 object that includes an array of EmailServices and a possible link for next set as paginated response
     *     with {@link PagedIterable}.
     */
    PagedIterable<EmailServiceResource> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * List Verified Domains From Exchange Online
     *
     * <p>Get a list of domains that are fully verified in Exchange Online.
     *
     * @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 list of domains that are fully verified in Exchange Online along with {@link Response}.
     */
    Response<List<String>> listVerifiedExchangeOnlineDomainsWithResponse(Context context);

    /**
     * List Verified Domains From Exchange Online
     *
     * <p>Get a list of domains that are fully verified in Exchange Online.
     *
     * @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 list of domains that are fully verified in Exchange Online.
     */
    List<String> listVerifiedExchangeOnlineDomains();

    /**
     * Get
     *
     * <p>Get the EmailService and its properties.
     *
     * @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 EmailService and its properties along with {@link Response}.
     */
    EmailServiceResource getById(String id);

    /**
     * Get
     *
     * <p>Get the EmailService and its properties.
     *
     * @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 EmailService and its properties along with {@link Response}.
     */
    Response<EmailServiceResource> getByIdWithResponse(String id, Context context);

    /**
     * Delete
     *
     * <p>Operation to delete a EmailService.
     *
     * @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 EmailService.
     *
     * @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.
     */
    void deleteByIdWithResponse(String id, Context context);

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