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

package com.azure.resourcemanager.sphere.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.util.Context;
import com.azure.resourcemanager.sphere.fluent.models.CertificateChainResponseInner;
import com.azure.resourcemanager.sphere.fluent.models.CertificateInner;
import com.azure.resourcemanager.sphere.fluent.models.ProofOfPossessionNonceResponseInner;
import com.azure.resourcemanager.sphere.models.ProofOfPossessionNonceRequest;

/** An instance of this class provides access to all the operations defined in CertificatesClient. */
public interface CertificatesClient {
    /**
     * List Certificate resources by Catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @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 Certificate list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<CertificateInner> listByCatalog(String resourceGroupName, String catalogName);

    /**
     * List Certificate resources by Catalog.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param filter Filter the result list using the given expression.
     * @param top The number of result items to return.
     * @param skip The number of result items to skip.
     * @param maxpagesize The maximum number of result items per page.
     * @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 Certificate list operation as paginated response with {@link PagedIterable}.
     */
    @ServiceMethod(returns = ReturnType.COLLECTION)
    PagedIterable<CertificateInner> listByCatalog(
        String resourceGroupName,
        String catalogName,
        String filter,
        Integer top,
        Integer skip,
        Integer maxpagesize,
        Context context);

    /**
     * Get a Certificate.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
     * @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 a Certificate along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<CertificateInner> getWithResponse(
        String resourceGroupName, String catalogName, String serialNumber, Context context);

    /**
     * Get a Certificate.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
     * @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 a Certificate.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CertificateInner get(String resourceGroupName, String catalogName, String serialNumber);

    /**
     * Retrieves cert chain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
     * @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 certificate chain response along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<CertificateChainResponseInner> retrieveCertChainWithResponse(
        String resourceGroupName, String catalogName, String serialNumber, Context context);

    /**
     * Retrieves cert chain.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
     * @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 certificate chain response.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    CertificateChainResponseInner retrieveCertChain(String resourceGroupName, String catalogName, String serialNumber);

    /**
     * Gets the proof of possession nonce.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
     * @param proofOfPossessionNonceRequest Proof of possession nonce request body.
     * @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 proof of possession nonce along with {@link Response}.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    Response<ProofOfPossessionNonceResponseInner> retrieveProofOfPossessionNonceWithResponse(
        String resourceGroupName,
        String catalogName,
        String serialNumber,
        ProofOfPossessionNonceRequest proofOfPossessionNonceRequest,
        Context context);

    /**
     * Gets the proof of possession nonce.
     *
     * @param resourceGroupName The name of the resource group. The name is case insensitive.
     * @param catalogName Name of catalog.
     * @param serialNumber Serial number of the certificate. Use '.default' to get current active certificate.
     * @param proofOfPossessionNonceRequest Proof of possession nonce request body.
     * @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 proof of possession nonce.
     */
    @ServiceMethod(returns = ReturnType.SINGLE)
    ProofOfPossessionNonceResponseInner retrieveProofOfPossessionNonce(
        String resourceGroupName,
        String catalogName,
        String serialNumber,
        ProofOfPossessionNonceRequest proofOfPossessionNonceRequest);
}
