/* tslint:disable */
/* eslint-disable */
/**
 * Jellyfin API
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 10.8.9
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


import * as runtime from '../runtime';
import type {
  GroupInfoDto,
  SyncPlayBufferingRequest,
  SyncPlayCreateGroupRequest,
  SyncPlayJoinGroupRequest,
  SyncPlayMovePlaylistItemRequest,
  SyncPlayNextItemRequest,
  SyncPlayPingRequest,
  SyncPlayPreviousItemRequest,
  SyncPlayQueueRequest,
  SyncPlayReadyRequest,
  SyncPlayRemoveFromPlaylistRequest,
  SyncPlaySeekRequest,
  SyncPlaySetIgnoreWaitRequest,
  SyncPlaySetNewQueueRequest,
  SyncPlaySetPlaylistItemRequest,
  SyncPlaySetRepeatModeRequest,
  SyncPlaySetShuffleModeRequest,
} from '../models';
import {
    GroupInfoDtoFromJSON,
    GroupInfoDtoToJSON,
    SyncPlayBufferingRequestFromJSON,
    SyncPlayBufferingRequestToJSON,
    SyncPlayCreateGroupRequestFromJSON,
    SyncPlayCreateGroupRequestToJSON,
    SyncPlayJoinGroupRequestFromJSON,
    SyncPlayJoinGroupRequestToJSON,
    SyncPlayMovePlaylistItemRequestFromJSON,
    SyncPlayMovePlaylistItemRequestToJSON,
    SyncPlayNextItemRequestFromJSON,
    SyncPlayNextItemRequestToJSON,
    SyncPlayPingRequestFromJSON,
    SyncPlayPingRequestToJSON,
    SyncPlayPreviousItemRequestFromJSON,
    SyncPlayPreviousItemRequestToJSON,
    SyncPlayQueueRequestFromJSON,
    SyncPlayQueueRequestToJSON,
    SyncPlayReadyRequestFromJSON,
    SyncPlayReadyRequestToJSON,
    SyncPlayRemoveFromPlaylistRequestFromJSON,
    SyncPlayRemoveFromPlaylistRequestToJSON,
    SyncPlaySeekRequestFromJSON,
    SyncPlaySeekRequestToJSON,
    SyncPlaySetIgnoreWaitRequestFromJSON,
    SyncPlaySetIgnoreWaitRequestToJSON,
    SyncPlaySetNewQueueRequestFromJSON,
    SyncPlaySetNewQueueRequestToJSON,
    SyncPlaySetPlaylistItemRequestFromJSON,
    SyncPlaySetPlaylistItemRequestToJSON,
    SyncPlaySetRepeatModeRequestFromJSON,
    SyncPlaySetRepeatModeRequestToJSON,
    SyncPlaySetShuffleModeRequestFromJSON,
    SyncPlaySetShuffleModeRequestToJSON,
} from '../models';

export interface SyncPlayBufferingOperationRequest {
    syncPlayBufferingRequest: SyncPlayBufferingRequest;
}

export interface SyncPlayCreateGroupOperationRequest {
    syncPlayCreateGroupRequest: SyncPlayCreateGroupRequest;
}

export interface SyncPlayJoinGroupOperationRequest {
    syncPlayJoinGroupRequest: SyncPlayJoinGroupRequest;
}

export interface SyncPlayMovePlaylistItemOperationRequest {
    syncPlayMovePlaylistItemRequest: SyncPlayMovePlaylistItemRequest;
}

export interface SyncPlayNextItemOperationRequest {
    syncPlayNextItemRequest: SyncPlayNextItemRequest;
}

export interface SyncPlayPingOperationRequest {
    syncPlayPingRequest: SyncPlayPingRequest;
}

export interface SyncPlayPreviousItemOperationRequest {
    syncPlayPreviousItemRequest: SyncPlayPreviousItemRequest;
}

export interface SyncPlayQueueOperationRequest {
    syncPlayQueueRequest: SyncPlayQueueRequest;
}

export interface SyncPlayReadyOperationRequest {
    syncPlayReadyRequest: SyncPlayReadyRequest;
}

export interface SyncPlayRemoveFromPlaylistOperationRequest {
    syncPlayRemoveFromPlaylistRequest: SyncPlayRemoveFromPlaylistRequest;
}

export interface SyncPlaySeekOperationRequest {
    syncPlaySeekRequest: SyncPlaySeekRequest;
}

export interface SyncPlaySetIgnoreWaitOperationRequest {
    syncPlaySetIgnoreWaitRequest: SyncPlaySetIgnoreWaitRequest;
}

export interface SyncPlaySetNewQueueOperationRequest {
    syncPlaySetNewQueueRequest: SyncPlaySetNewQueueRequest;
}

export interface SyncPlaySetPlaylistItemOperationRequest {
    syncPlaySetPlaylistItemRequest: SyncPlaySetPlaylistItemRequest;
}

export interface SyncPlaySetRepeatModeOperationRequest {
    syncPlaySetRepeatModeRequest: SyncPlaySetRepeatModeRequest;
}

export interface SyncPlaySetShuffleModeOperationRequest {
    syncPlaySetShuffleModeRequest: SyncPlaySetShuffleModeRequest;
}

/**
 * 
 */
export class SyncPlayApi extends runtime.BaseAPI {

    /**
     * Notify SyncPlay group that member is buffering.
     */
    async syncPlayBufferingRaw(requestParameters: SyncPlayBufferingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayBufferingRequest === null || requestParameters.syncPlayBufferingRequest === undefined) {
            throw new runtime.RequiredError('syncPlayBufferingRequest','Required parameter requestParameters.syncPlayBufferingRequest was null or undefined when calling syncPlayBuffering.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Buffering`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayBufferingRequestToJSON(requestParameters.syncPlayBufferingRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Notify SyncPlay group that member is buffering.
     */
    async syncPlayBuffering(requestParameters: SyncPlayBufferingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayBufferingRaw(requestParameters, initOverrides);
    }

    /**
     * Create a new SyncPlay group.
     */
    async syncPlayCreateGroupRaw(requestParameters: SyncPlayCreateGroupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayCreateGroupRequest === null || requestParameters.syncPlayCreateGroupRequest === undefined) {
            throw new runtime.RequiredError('syncPlayCreateGroupRequest','Required parameter requestParameters.syncPlayCreateGroupRequest was null or undefined when calling syncPlayCreateGroup.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/New`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayCreateGroupRequestToJSON(requestParameters.syncPlayCreateGroupRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Create a new SyncPlay group.
     */
    async syncPlayCreateGroup(requestParameters: SyncPlayCreateGroupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayCreateGroupRaw(requestParameters, initOverrides);
    }

    /**
     * Gets all SyncPlay groups.
     */
    async syncPlayGetGroupsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<GroupInfoDto>>> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/List`,
            method: 'GET',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(GroupInfoDtoFromJSON));
    }

    /**
     * Gets all SyncPlay groups.
     */
    async syncPlayGetGroups(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<GroupInfoDto>> {
        const response = await this.syncPlayGetGroupsRaw(initOverrides);
        return await response.value();
    }

    /**
     * Join an existing SyncPlay group.
     */
    async syncPlayJoinGroupRaw(requestParameters: SyncPlayJoinGroupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayJoinGroupRequest === null || requestParameters.syncPlayJoinGroupRequest === undefined) {
            throw new runtime.RequiredError('syncPlayJoinGroupRequest','Required parameter requestParameters.syncPlayJoinGroupRequest was null or undefined when calling syncPlayJoinGroup.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Join`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayJoinGroupRequestToJSON(requestParameters.syncPlayJoinGroupRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Join an existing SyncPlay group.
     */
    async syncPlayJoinGroup(requestParameters: SyncPlayJoinGroupOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayJoinGroupRaw(requestParameters, initOverrides);
    }

    /**
     * Leave the joined SyncPlay group.
     */
    async syncPlayLeaveGroupRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Leave`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Leave the joined SyncPlay group.
     */
    async syncPlayLeaveGroup(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayLeaveGroupRaw(initOverrides);
    }

    /**
     * Request to move an item in the playlist in SyncPlay group.
     */
    async syncPlayMovePlaylistItemRaw(requestParameters: SyncPlayMovePlaylistItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayMovePlaylistItemRequest === null || requestParameters.syncPlayMovePlaylistItemRequest === undefined) {
            throw new runtime.RequiredError('syncPlayMovePlaylistItemRequest','Required parameter requestParameters.syncPlayMovePlaylistItemRequest was null or undefined when calling syncPlayMovePlaylistItem.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/MovePlaylistItem`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayMovePlaylistItemRequestToJSON(requestParameters.syncPlayMovePlaylistItemRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to move an item in the playlist in SyncPlay group.
     */
    async syncPlayMovePlaylistItem(requestParameters: SyncPlayMovePlaylistItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayMovePlaylistItemRaw(requestParameters, initOverrides);
    }

    /**
     * Request next item in SyncPlay group.
     */
    async syncPlayNextItemRaw(requestParameters: SyncPlayNextItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayNextItemRequest === null || requestParameters.syncPlayNextItemRequest === undefined) {
            throw new runtime.RequiredError('syncPlayNextItemRequest','Required parameter requestParameters.syncPlayNextItemRequest was null or undefined when calling syncPlayNextItem.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/NextItem`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayNextItemRequestToJSON(requestParameters.syncPlayNextItemRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request next item in SyncPlay group.
     */
    async syncPlayNextItem(requestParameters: SyncPlayNextItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayNextItemRaw(requestParameters, initOverrides);
    }

    /**
     * Request pause in SyncPlay group.
     */
    async syncPlayPauseRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Pause`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request pause in SyncPlay group.
     */
    async syncPlayPause(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayPauseRaw(initOverrides);
    }

    /**
     * Update session ping.
     */
    async syncPlayPingRaw(requestParameters: SyncPlayPingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayPingRequest === null || requestParameters.syncPlayPingRequest === undefined) {
            throw new runtime.RequiredError('syncPlayPingRequest','Required parameter requestParameters.syncPlayPingRequest was null or undefined when calling syncPlayPing.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Ping`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayPingRequestToJSON(requestParameters.syncPlayPingRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Update session ping.
     */
    async syncPlayPing(requestParameters: SyncPlayPingOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayPingRaw(requestParameters, initOverrides);
    }

    /**
     * Request previous item in SyncPlay group.
     */
    async syncPlayPreviousItemRaw(requestParameters: SyncPlayPreviousItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayPreviousItemRequest === null || requestParameters.syncPlayPreviousItemRequest === undefined) {
            throw new runtime.RequiredError('syncPlayPreviousItemRequest','Required parameter requestParameters.syncPlayPreviousItemRequest was null or undefined when calling syncPlayPreviousItem.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/PreviousItem`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayPreviousItemRequestToJSON(requestParameters.syncPlayPreviousItemRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request previous item in SyncPlay group.
     */
    async syncPlayPreviousItem(requestParameters: SyncPlayPreviousItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayPreviousItemRaw(requestParameters, initOverrides);
    }

    /**
     * Request to queue items to the playlist of a SyncPlay group.
     */
    async syncPlayQueueRaw(requestParameters: SyncPlayQueueOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayQueueRequest === null || requestParameters.syncPlayQueueRequest === undefined) {
            throw new runtime.RequiredError('syncPlayQueueRequest','Required parameter requestParameters.syncPlayQueueRequest was null or undefined when calling syncPlayQueue.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Queue`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayQueueRequestToJSON(requestParameters.syncPlayQueueRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to queue items to the playlist of a SyncPlay group.
     */
    async syncPlayQueue(requestParameters: SyncPlayQueueOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayQueueRaw(requestParameters, initOverrides);
    }

    /**
     * Notify SyncPlay group that member is ready for playback.
     */
    async syncPlayReadyRaw(requestParameters: SyncPlayReadyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayReadyRequest === null || requestParameters.syncPlayReadyRequest === undefined) {
            throw new runtime.RequiredError('syncPlayReadyRequest','Required parameter requestParameters.syncPlayReadyRequest was null or undefined when calling syncPlayReady.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Ready`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayReadyRequestToJSON(requestParameters.syncPlayReadyRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Notify SyncPlay group that member is ready for playback.
     */
    async syncPlayReady(requestParameters: SyncPlayReadyOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayReadyRaw(requestParameters, initOverrides);
    }

    /**
     * Request to remove items from the playlist in SyncPlay group.
     */
    async syncPlayRemoveFromPlaylistRaw(requestParameters: SyncPlayRemoveFromPlaylistOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlayRemoveFromPlaylistRequest === null || requestParameters.syncPlayRemoveFromPlaylistRequest === undefined) {
            throw new runtime.RequiredError('syncPlayRemoveFromPlaylistRequest','Required parameter requestParameters.syncPlayRemoveFromPlaylistRequest was null or undefined when calling syncPlayRemoveFromPlaylist.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/RemoveFromPlaylist`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlayRemoveFromPlaylistRequestToJSON(requestParameters.syncPlayRemoveFromPlaylistRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to remove items from the playlist in SyncPlay group.
     */
    async syncPlayRemoveFromPlaylist(requestParameters: SyncPlayRemoveFromPlaylistOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayRemoveFromPlaylistRaw(requestParameters, initOverrides);
    }

    /**
     * Request seek in SyncPlay group.
     */
    async syncPlaySeekRaw(requestParameters: SyncPlaySeekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlaySeekRequest === null || requestParameters.syncPlaySeekRequest === undefined) {
            throw new runtime.RequiredError('syncPlaySeekRequest','Required parameter requestParameters.syncPlaySeekRequest was null or undefined when calling syncPlaySeek.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Seek`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlaySeekRequestToJSON(requestParameters.syncPlaySeekRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request seek in SyncPlay group.
     */
    async syncPlaySeek(requestParameters: SyncPlaySeekOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlaySeekRaw(requestParameters, initOverrides);
    }

    /**
     * Request SyncPlay group to ignore member during group-wait.
     */
    async syncPlaySetIgnoreWaitRaw(requestParameters: SyncPlaySetIgnoreWaitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlaySetIgnoreWaitRequest === null || requestParameters.syncPlaySetIgnoreWaitRequest === undefined) {
            throw new runtime.RequiredError('syncPlaySetIgnoreWaitRequest','Required parameter requestParameters.syncPlaySetIgnoreWaitRequest was null or undefined when calling syncPlaySetIgnoreWait.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/SetIgnoreWait`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlaySetIgnoreWaitRequestToJSON(requestParameters.syncPlaySetIgnoreWaitRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request SyncPlay group to ignore member during group-wait.
     */
    async syncPlaySetIgnoreWait(requestParameters: SyncPlaySetIgnoreWaitOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlaySetIgnoreWaitRaw(requestParameters, initOverrides);
    }

    /**
     * Request to set new playlist in SyncPlay group.
     */
    async syncPlaySetNewQueueRaw(requestParameters: SyncPlaySetNewQueueOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlaySetNewQueueRequest === null || requestParameters.syncPlaySetNewQueueRequest === undefined) {
            throw new runtime.RequiredError('syncPlaySetNewQueueRequest','Required parameter requestParameters.syncPlaySetNewQueueRequest was null or undefined when calling syncPlaySetNewQueue.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/SetNewQueue`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlaySetNewQueueRequestToJSON(requestParameters.syncPlaySetNewQueueRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to set new playlist in SyncPlay group.
     */
    async syncPlaySetNewQueue(requestParameters: SyncPlaySetNewQueueOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlaySetNewQueueRaw(requestParameters, initOverrides);
    }

    /**
     * Request to change playlist item in SyncPlay group.
     */
    async syncPlaySetPlaylistItemRaw(requestParameters: SyncPlaySetPlaylistItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlaySetPlaylistItemRequest === null || requestParameters.syncPlaySetPlaylistItemRequest === undefined) {
            throw new runtime.RequiredError('syncPlaySetPlaylistItemRequest','Required parameter requestParameters.syncPlaySetPlaylistItemRequest was null or undefined when calling syncPlaySetPlaylistItem.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/SetPlaylistItem`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlaySetPlaylistItemRequestToJSON(requestParameters.syncPlaySetPlaylistItemRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to change playlist item in SyncPlay group.
     */
    async syncPlaySetPlaylistItem(requestParameters: SyncPlaySetPlaylistItemOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlaySetPlaylistItemRaw(requestParameters, initOverrides);
    }

    /**
     * Request to set repeat mode in SyncPlay group.
     */
    async syncPlaySetRepeatModeRaw(requestParameters: SyncPlaySetRepeatModeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlaySetRepeatModeRequest === null || requestParameters.syncPlaySetRepeatModeRequest === undefined) {
            throw new runtime.RequiredError('syncPlaySetRepeatModeRequest','Required parameter requestParameters.syncPlaySetRepeatModeRequest was null or undefined when calling syncPlaySetRepeatMode.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/SetRepeatMode`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlaySetRepeatModeRequestToJSON(requestParameters.syncPlaySetRepeatModeRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to set repeat mode in SyncPlay group.
     */
    async syncPlaySetRepeatMode(requestParameters: SyncPlaySetRepeatModeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlaySetRepeatModeRaw(requestParameters, initOverrides);
    }

    /**
     * Request to set shuffle mode in SyncPlay group.
     */
    async syncPlaySetShuffleModeRaw(requestParameters: SyncPlaySetShuffleModeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        if (requestParameters.syncPlaySetShuffleModeRequest === null || requestParameters.syncPlaySetShuffleModeRequest === undefined) {
            throw new runtime.RequiredError('syncPlaySetShuffleModeRequest','Required parameter requestParameters.syncPlaySetShuffleModeRequest was null or undefined when calling syncPlaySetShuffleMode.');
        }

        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        headerParameters['Content-Type'] = 'application/json';

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/SetShuffleMode`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
            body: SyncPlaySetShuffleModeRequestToJSON(requestParameters.syncPlaySetShuffleModeRequest),
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request to set shuffle mode in SyncPlay group.
     */
    async syncPlaySetShuffleMode(requestParameters: SyncPlaySetShuffleModeOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlaySetShuffleModeRaw(requestParameters, initOverrides);
    }

    /**
     * Request stop in SyncPlay group.
     */
    async syncPlayStopRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Stop`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request stop in SyncPlay group.
     */
    async syncPlayStop(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayStopRaw(initOverrides);
    }

    /**
     * Request unpause in SyncPlay group.
     */
    async syncPlayUnpauseRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
        const queryParameters: any = {};

        const headerParameters: runtime.HTTPHeaders = {};

        if (this.configuration && this.configuration.apiKey) {
            headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
        }

        const response = await this.request({
            path: `/SyncPlay/Unpause`,
            method: 'POST',
            headers: headerParameters,
            query: queryParameters,
        }, initOverrides);

        return new runtime.VoidApiResponse(response);
    }

    /**
     * Request unpause in SyncPlay group.
     */
    async syncPlayUnpause(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
        await this.syncPlayUnpauseRaw(initOverrides);
    }

}
