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

package com.azure.resourcemanager.support.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 SupportTickets. */
public interface SupportTickets {
    /**
     * Check the availability of a resource name. This API should be used to check the uniqueness of the name for
     * support ticket creation for the selected subscription.
     *
     * @param checkNameAvailabilityInput Input to check.
     * @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 output of check name availability API along with {@link Response}.
     */
    Response<CheckNameAvailabilityOutput> checkNameAvailabilityWithResponse(
        CheckNameAvailabilityInput checkNameAvailabilityInput, Context context);

    /**
     * Check the availability of a resource name. This API should be used to check the uniqueness of the name for
     * support ticket creation for the selected subscription.
     *
     * @param checkNameAvailabilityInput Input to check.
     * @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 output of check name availability API.
     */
    CheckNameAvailabilityOutput checkNameAvailability(CheckNameAvailabilityInput checkNameAvailabilityInput);

    /**
     * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by _Status_,
     * _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter. Output will be a paged
     * result with _nextLink_, using which you can retrieve the next set of support tickets.
     * &lt;br/&gt;&lt;br/&gt;Support ticket data is available for 18 months after ticket creation. If a ticket was
     * created more than 18 months ago, a request for data might cause an error.
     *
     * @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 represents a collection of SupportTicket resources as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SupportTicketDetails> list();

    /**
     * Lists all the support tickets for an Azure subscription. You can also filter the support tickets by _Status_,
     * _CreatedDate_, _ServiceId_, and _ProblemClassificationId_ using the $filter parameter. Output will be a paged
     * result with _nextLink_, using which you can retrieve the next set of support tickets.
     * &lt;br/&gt;&lt;br/&gt;Support ticket data is available for 18 months after ticket creation. If a ticket was
     * created more than 18 months ago, a request for data might cause an error.
     *
     * @param top The number of values to return in the collection. Default is 25 and max is 100.
     * @param filter The filter to apply on the operation. We support 'odata v4.0' filter semantics. [Learn
     *     more](https://docs.microsoft.com/odata/concepts/queryoptions-overview). _Status_, _ServiceId_, and
     *     _ProblemClassificationId_ filters can only be used with Equals ('eq') operator. For _CreatedDate_ filter, the
     *     supported operators are Greater Than ('gt') and Greater Than or Equals ('ge'). When using both filters,
     *     combine them using the logical 'AND'.
     * @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 represents a collection of SupportTicket resources as paginated response with {@link
     *     PagedIterable}.
     */
    PagedIterable<SupportTicketDetails> list(Integer top, String filter, Context context);

    /**
     * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket
     * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
     *
     * @param supportTicketName Support ticket 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 ticket details for an Azure subscription along with {@link Response}.
     */
    Response<SupportTicketDetails> getWithResponse(String supportTicketName, Context context);

    /**
     * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket
     * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
     *
     * @param supportTicketName Support ticket 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 ticket details for an Azure subscription.
     */
    SupportTicketDetails get(String supportTicketName);

    /**
     * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket
     * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
     *
     * @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 ticket details for an Azure subscription along with {@link Response}.
     */
    SupportTicketDetails getById(String id);

    /**
     * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket
     * creation. If a ticket was created more than 18 months ago, a request for data might cause an error.
     *
     * @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 ticket details for an Azure subscription along with {@link Response}.
     */
    Response<SupportTicketDetails> getByIdWithResponse(String id, Context context);

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