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

package com.azure.resourcemanager.orbital.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.orbital.fluent.models.ContactInner;

/** An instance of this class provides access to all the operations defined in ContactsClient. */
public interface ContactsClient {
    /**
     * Returns list of contacts by spacecraftName.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft 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 response for the ListContacts API service call as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ContactInner> list(String resourceGroupName, String spacecraftName);

    /**
     * Returns list of contacts by spacecraftName.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param skiptoken An opaque string that the resource provider uses to skip over previously-returned results. This
     *     is used when a previous list operation call returned a partial result. If a previous response contains a
     *     nextLink element, the value of the nextLink element will include a skiptoken parameter that specifies a
     *     starting point to use for subsequent calls.
     * @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 response for the ListContacts API service call as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<ContactInner> list(
        String resourceGroupName, String spacecraftName, String skiptoken, Context context);

    /**
     * Gets the specified contact in a specified resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact 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 specified contact in a specified resource group along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ContactInner> getWithResponse(
        String resourceGroupName, String spacecraftName, String contactName, Context context);

    /**
     * Gets the specified contact in a specified resource group.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact 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 specified contact in a specified resource group.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ContactInner get(String resourceGroupName, String spacecraftName, String contactName);

    /**
     * Creates a contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact name.
     * @param parameters The parameters to provide for the created contact.
     * @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 SyncPoller} for polling of customer creates a contact resource for a spacecraft resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ContactInner>, ContactInner> beginCreate(
        String resourceGroupName, String spacecraftName, String contactName, ContactInner parameters);

    /**
     * Creates a contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact name.
     * @param parameters The parameters to provide for the created contact.
     * @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 SyncPoller} for polling of customer creates a contact resource for a spacecraft resource.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<ContactInner>, ContactInner> beginCreate(
        String resourceGroupName, String spacecraftName, String contactName, ContactInner parameters, Context context);

    /**
     * Creates a contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact name.
     * @param parameters The parameters to provide for the created contact.
     * @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 customer creates a contact resource for a spacecraft resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ContactInner create(String resourceGroupName, String spacecraftName, String contactName, ContactInner parameters);

    /**
     * Creates a contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact name.
     * @param parameters The parameters to provide for the created contact.
     * @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 customer creates a contact resource for a spacecraft resource.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ContactInner create(
        String resourceGroupName, String spacecraftName, String contactName, ContactInner parameters, Context context);

    /**
     * Deletes a specified contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(String resourceGroupName, String spacecraftName, String contactName);

    /**
     * Deletes a specified contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact 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 {@link SyncPoller} for polling of long-running operation.
     */
    @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
    SyncPoller<PollResult<Void>, Void> beginDelete(
        String resourceGroupName, String spacecraftName, String contactName, Context context);

    /**
     * Deletes a specified contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact 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 spacecraftName, String contactName);

    /**
     * Deletes a specified contact.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param spacecraftName Spacecraft ID.
     * @param contactName Contact 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 spacecraftName, String contactName, Context context);
}
