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

package com.azure.resourcemanager.providerhub.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 CustomRollouts. */
public interface CustomRollouts {
    /**
     * Gets the custom rollout details.
     *
     * @param providerNamespace The name of the resource provider hosted within ProviderHub.
     * @param rolloutName The rollout 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 custom rollout details along with {@link Response}.
     */
    Response<CustomRollout> getWithResponse(String providerNamespace, String rolloutName, Context context);

    /**
     * Gets the custom rollout details.
     *
     * @param providerNamespace The name of the resource provider hosted within ProviderHub.
     * @param rolloutName The rollout 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 custom rollout details.
     */
    CustomRollout get(String providerNamespace, String rolloutName);

    /**
     * Gets the list of the custom rollouts for the given provider.
     *
     * @param providerNamespace The name of the resource provider hosted within ProviderHub.
     * @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 list of the custom rollouts for the given provider as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomRollout> listByProviderRegistration(String providerNamespace);

    /**
     * Gets the list of the custom rollouts for the given provider.
     *
     * @param providerNamespace The name of the resource provider hosted within ProviderHub.
     * @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 list of the custom rollouts for the given provider as paginated response with {@link PagedIterable}.
     */
    PagedIterable<CustomRollout> listByProviderRegistration(String providerNamespace, Context context);

    /**
     * Gets the custom rollout details.
     *
     * @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 custom rollout details along with {@link Response}.
     */
    CustomRollout getById(String id);

    /**
     * Gets the custom rollout details.
     *
     * @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 custom rollout details along with {@link Response}.
     */
    Response<CustomRollout> getByIdWithResponse(String id, Context context);

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