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

package com.azure.resourcemanager.maintenance.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 MaintenanceConfigurations. */
public interface MaintenanceConfigurations {
    /**
     * Get Configuration record.
     *
     * @param resourceGroupName Resource Group Name.
     * @param resourceName Maintenance Configuration 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 configuration record along with {@link Response}.
     */
    Response<MaintenanceConfiguration> getByResourceGroupWithResponse(
        String resourceGroupName, String resourceName, Context context);

    /**
     * Get Configuration record.
     *
     * @param resourceGroupName Resource Group Name.
     * @param resourceName Maintenance Configuration 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 configuration record.
     */
    MaintenanceConfiguration getByResourceGroup(String resourceGroupName, String resourceName);

    /**
     * Delete Configuration record.
     *
     * @param resourceGroupName Resource Group Name.
     * @param resourceName Maintenance Configuration 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 maintenance configuration record type along with {@link Response}.
     */
    Response<MaintenanceConfiguration> deleteByResourceGroupWithResponse(
        String resourceGroupName, String resourceName, Context context);

    /**
     * Delete Configuration record.
     *
     * @param resourceGroupName Resource Group Name.
     * @param resourceName Maintenance Configuration 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 maintenance configuration record type.
     */
    MaintenanceConfiguration deleteByResourceGroup(String resourceGroupName, String resourceName);

    /**
     * Get Configuration records within 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 configuration records within a subscription as paginated response with {@link PagedIterable}.
     */
    PagedIterable<MaintenanceConfiguration> list();

    /**
     * Get Configuration records within 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 configuration records within a subscription as paginated response with {@link PagedIterable}.
     */
    PagedIterable<MaintenanceConfiguration> list(Context context);

    /**
     * Get Configuration record.
     *
     * @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 configuration record along with {@link Response}.
     */
    MaintenanceConfiguration getById(String id);

    /**
     * Get Configuration record.
     *
     * @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 configuration record along with {@link Response}.
     */
    Response<MaintenanceConfiguration> getByIdWithResponse(String id, Context context);

    /**
     * Delete Configuration record.
     *
     * @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 maintenance configuration record type along with {@link Response}.
     */
    MaintenanceConfiguration deleteById(String id);

    /**
     * Delete Configuration record.
     *
     * @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 maintenance configuration record type along with {@link Response}.
     */
    Response<MaintenanceConfiguration> deleteByIdWithResponse(String id, Context context);

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