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

package com.azure.resourcemanager.confidentialledger.models;

import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.confidentialledger.fluent.models.ManagedCcfInner;

/** Resource collection API of ManagedCcfs. */
public interface ManagedCcfs {
    /**
     * Retrieves information about a Managed CCF resource.
     *
     * <p>Retrieves the properties of a Managed CCF app.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param appName Name of the Managed CCF.
     * @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 managed CCF along with {@link Response}.
     */
    Response<ManagedCcf> getByResourceGroupWithResponse(String resourceGroupName, String appName, Context context);

    /**
     * Retrieves information about a Managed CCF resource.
     *
     * <p>Retrieves the properties of a Managed CCF app.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param appName Name of the Managed CCF.
     * @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 managed CCF.
     */
    ManagedCcf getByResourceGroup(String resourceGroupName, String appName);

    /**
     * Deletes a Managed CCF resource.
     *
     * <p>Deletes an existing Managed CCF.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param appName Name of the Managed CCF.
     * @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 appName);

    /**
     * Deletes a Managed CCF resource.
     *
     * <p>Deletes an existing Managed CCF.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param appName Name of the Managed CCF.
     * @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 appName, Context context);

    /**
     * Update Managed CCF properties
     *
     * <p>Updates properties of Managed CCF.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param appName Name of the Managed CCF.
     * @param managedCcf Request body for Updating Managed CCF App.
     * @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 update(String resourceGroupName, String appName, ManagedCcfInner managedCcf);

    /**
     * Update Managed CCF properties
     *
     * <p>Updates properties of Managed CCF.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param appName Name of the Managed CCF.
     * @param managedCcf Request body for Updating Managed CCF App.
     * @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 update(String resourceGroupName, String appName, ManagedCcfInner managedCcf, Context context);

    /**
     * Retrieves information about all Managed CCF resources under the given subscription and resource group
     *
     * <p>Retrieves the properties of all Managed CCF apps.
     *
     * @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 Managed CCF and a possible link for next set as paginated response with
     *     {@link PagedIterable}.
     */
    PagedIterable<ManagedCcf> listByResourceGroup(String resourceGroupName);

    /**
     * Retrieves information about all Managed CCF resources under the given subscription and resource group
     *
     * <p>Retrieves the properties of all Managed CCF apps.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
     * @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 Managed CCF and a possible link for next set as paginated response with
     *     {@link PagedIterable}.
     */
    PagedIterable<ManagedCcf> listByResourceGroup(String resourceGroupName, String filter, Context context);

    /**
     * Retrieves information about all Managed CCF resources under the given subscription
     *
     * <p>Retrieves the properties of all Managed CCF.
     *
     * @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 Managed CCF and a possible link for next set as paginated response with
     *     {@link PagedIterable}.
     */
    PagedIterable<ManagedCcf> list();

    /**
     * Retrieves information about all Managed CCF resources under the given subscription
     *
     * <p>Retrieves the properties of all Managed CCF.
     *
     * @param filter The filter to apply on the list operation. eg. $filter=ledgerType eq 'Public'.
     * @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 Managed CCF and a possible link for next set as paginated response with
     *     {@link PagedIterable}.
     */
    PagedIterable<ManagedCcf> list(String filter, Context context);

    /**
     * Retrieves information about a Managed CCF resource.
     *
     * <p>Retrieves the properties of a Managed CCF app.
     *
     * @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 managed CCF along with {@link Response}.
     */
    ManagedCcf getById(String id);

    /**
     * Retrieves information about a Managed CCF resource.
     *
     * <p>Retrieves the properties of a Managed CCF app.
     *
     * @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 managed CCF along with {@link Response}.
     */
    Response<ManagedCcf> getByIdWithResponse(String id, Context context);

    /**
     * Deletes a Managed CCF resource.
     *
     * <p>Deletes an existing Managed CCF.
     *
     * @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);

    /**
     * Deletes a Managed CCF resource.
     *
     * <p>Deletes an existing Managed CCF.
     *
     * @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 ManagedCcf resource.
     *
     * @param name resource name.
     * @return the first stage of the new ManagedCcf definition.
     */
    ManagedCcf.DefinitionStages.Blank define(String name);
}
