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

package com.azure.resourcemanager.managementgroups.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import com.azure.resourcemanager.managementgroups.fluent.models.HierarchySettingsInner;
import com.azure.resourcemanager.managementgroups.fluent.models.HierarchySettingsListInner;
import com.azure.resourcemanager.managementgroups.models.CreateOrUpdateSettingsRequest;

/** An instance of this class provides access to all the operations defined in HierarchySettingsOperationsClient. */
public interface HierarchySettingsOperationsClient {
    /**
     * Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root
     * Management Group of the hierarchy.
     *
     * @param groupId Management Group 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 all the hierarchy settings defined at the Management Group level along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<HierarchySettingsListInner> listWithResponse(String groupId, Context context);

    /**
     * Gets all the hierarchy settings defined at the Management Group level. Settings can only be set on the root
     * Management Group of the hierarchy.
     *
     * @param groupId Management Group 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 all the hierarchy settings defined at the Management Group level.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    HierarchySettingsListInner list(String groupId);

    /**
     * Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root
     * Management Group of the hierarchy.
     *
     * @param groupId Management Group 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 hierarchy settings defined at the Management Group level along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<HierarchySettingsInner> getWithResponse(String groupId, Context context);

    /**
     * Gets the hierarchy settings defined at the Management Group level. Settings can only be set on the root
     * Management Group of the hierarchy.
     *
     * @param groupId Management Group 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 hierarchy settings defined at the Management Group level.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    HierarchySettingsInner get(String groupId);

    /**
     * Creates or updates the hierarchy settings defined at the Management Group level.
     *
     * @param groupId Management Group ID.
     * @param createTenantSettingsRequest Tenant level settings request parameter.
     * @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 settings defined at the Management Group scope along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<HierarchySettingsInner> createOrUpdateWithResponse(
        String groupId, CreateOrUpdateSettingsRequest createTenantSettingsRequest, Context context);

    /**
     * Creates or updates the hierarchy settings defined at the Management Group level.
     *
     * @param groupId Management Group ID.
     * @param createTenantSettingsRequest Tenant level settings request parameter.
     * @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 settings defined at the Management Group scope.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    HierarchySettingsInner createOrUpdate(String groupId, CreateOrUpdateSettingsRequest createTenantSettingsRequest);

    /**
     * Updates the hierarchy settings defined at the Management Group level.
     *
     * @param groupId Management Group ID.
     * @param createTenantSettingsRequest Tenant level settings request parameter.
     * @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 settings defined at the Management Group scope along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<HierarchySettingsInner> updateWithResponse(
        String groupId, CreateOrUpdateSettingsRequest createTenantSettingsRequest, Context context);

    /**
     * Updates the hierarchy settings defined at the Management Group level.
     *
     * @param groupId Management Group ID.
     * @param createTenantSettingsRequest Tenant level settings request parameter.
     * @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 settings defined at the Management Group scope.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    HierarchySettingsInner update(String groupId, CreateOrUpdateSettingsRequest createTenantSettingsRequest);

    /**
     * Deletes the hierarchy settings defined at the Management Group level.
     *
     * @param groupId Management Group 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}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<Void> deleteWithResponse(String groupId, Context context);

    /**
     * Deletes the hierarchy settings defined at the Management Group level.
     *
     * @param groupId Management Group 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String groupId);
}
