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

package com.azure.resourcemanager.confluent.fluent;

import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
import com.azure.core.http.rest.PagedIterable;
import com.azure.core.http.rest.Response;
import com.azure.core.management.polling.PollResult;
import com.azure.core.util.Context;
import com.azure.core.util.polling.SyncPoller;
import com.azure.resourcemanager.confluent.fluent.models.OrganizationResourceInner;
import com.azure.resourcemanager.confluent.models.OrganizationResourceUpdate;

/** An instance of this class provides access to all the operations defined in OrganizationsClient. */
public interface OrganizationsClient {
    /**
     * List all organizations under the specified 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 the response of a list operation.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<OrganizationResourceInner> list();

    /**
     * List all organizations under the specified 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 the response of a list operation.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<OrganizationResourceInner> list(Context context);

    /**
     * List all Organizations under the specified resource group.
     *
     * @param resourceGroupName Resource group 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 the response of a list operation.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<OrganizationResourceInner> listByResourceGroup(String resourceGroupName);

    /**
     * List all Organizations under the specified resource group.
     *
     * @param resourceGroupName Resource group 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 the response of a list operation.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<OrganizationResourceInner> listByResourceGroup(String resourceGroupName, Context context);

    /**
     * Get the properties of a specific Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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 the properties of a specific Organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    OrganizationResourceInner getByResourceGroup(String resourceGroupName, String organizationName);

    /**
     * Get the properties of a specific Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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 the properties of a specific Organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<OrganizationResourceInner> getByResourceGroupWithResponse(
        String resourceGroupName, String organizationName, Context context);

    /**
     * Create Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource name.
     * @param body Organization resource model.
     * @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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<OrganizationResourceInner>, OrganizationResourceInner> beginCreate(
        String resourceGroupName, String organizationName, OrganizationResourceInner body);

    /**
     * Create Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource name.
     * @param body Organization resource model.
     * @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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<OrganizationResourceInner>, OrganizationResourceInner> beginCreate(
        String resourceGroupName, String organizationName, OrganizationResourceInner body, Context context);

    /**
     * Create Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource name.
     * @param body Organization resource model.
     * @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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    OrganizationResourceInner create(String resourceGroupName, String organizationName, OrganizationResourceInner body);

    /**
     * Create Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    OrganizationResourceInner create(String resourceGroupName, String organizationName);

    /**
     * Create Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource name.
     * @param body Organization resource model.
     * @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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    OrganizationResourceInner create(
        String resourceGroupName, String organizationName, OrganizationResourceInner body, Context context);

    /**
     * Update Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    OrganizationResourceInner update(String resourceGroupName, String organizationName);

    /**
     * Update Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource name.
     * @param body Updated Organization 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 organization resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<OrganizationResourceInner> updateWithResponse(
        String resourceGroupName, String organizationName, OrganizationResourceUpdate body, Context context);

    /**
     * Delete Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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 the completion.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String organizationName);

    /**
     * Delete Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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 the completion.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String organizationName, Context context);

    /**
     * Delete Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String organizationName);

    /**
     * Delete Organization resource.
     *
     * @param resourceGroupName Resource group name.
     * @param organizationName Organization resource 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.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    void delete(String resourceGroupName, String organizationName, Context context);
}
