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

package com.azure.resourcemanager.imagebuilder.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 Triggers. */
public interface Triggers {
    /**
     * List all triggers for the specified Image Template resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param imageTemplateName The name of the image Template.
     * @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 result of List triggers operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Trigger> listByImageTemplate(String resourceGroupName, String imageTemplateName);

    /**
     * List all triggers for the specified Image Template resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param imageTemplateName The name of the image Template.
     * @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 result of List triggers operation as paginated response with {@link PagedIterable}.
     */
    PagedIterable<Trigger> listByImageTemplate(String resourceGroupName, String imageTemplateName, Context context);

    /**
     * Get the specified trigger for the specified image template resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param imageTemplateName The name of the image Template.
     * @param triggerName The name of the trigger.
     * @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 specified trigger for the specified image template resource along with {@link Response}.
     */
    Response<Trigger> getWithResponse(
        String resourceGroupName, String imageTemplateName, String triggerName, Context context);

    /**
     * Get the specified trigger for the specified image template resource.
     *
     * @param resourceGroupName The name of the resource group.
     * @param imageTemplateName The name of the image Template.
     * @param triggerName The name of the trigger.
     * @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 specified trigger for the specified image template resource.
     */
    Trigger get(String resourceGroupName, String imageTemplateName, String triggerName);

    /**
     * Delete a trigger for the specified virtual machine image template.
     *
     * @param resourceGroupName The name of the resource group.
     * @param imageTemplateName The name of the image Template.
     * @param triggerName The name of the trigger.
     * @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 imageTemplateName, String triggerName);

    /**
     * Delete a trigger for the specified virtual machine image template.
     *
     * @param resourceGroupName The name of the resource group.
     * @param imageTemplateName The name of the image Template.
     * @param triggerName The name of the trigger.
     * @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 imageTemplateName, String triggerName, Context context);

    /**
     * Get the specified trigger for the specified image template resource.
     *
     * @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 specified trigger for the specified image template resource along with {@link Response}.
     */
    Trigger getById(String id);

    /**
     * Get the specified trigger for the specified image template resource.
     *
     * @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 specified trigger for the specified image template resource along with {@link Response}.
     */
    Response<Trigger> getByIdWithResponse(String id, Context context);

    /**
     * Delete a trigger for the specified virtual machine image template.
     *
     * @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);

    /**
     * Delete a trigger for the specified virtual machine image template.
     *
     * @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 Trigger resource.
     *
     * @param name resource name.
     * @return the first stage of the new Trigger definition.
     */
    Trigger.DefinitionStages.Blank define(String name);
}
