/* tslint:disable */
/* eslint-disable */
/**
 * Nech.PL Audio Intelligence API
 * Stem-aware audio analysis — emotion, features, sample role, loop grading, onsets/tempo, waveform & spectrogram, loudness, naming. The `audio` API of the Nech.PL APIs platform, served at /audio/v1/...; the gateway does central auth + metering (Bearer token).
 *
 * The version of the OpenAPI document: 0.1.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { mapValues } from '../runtime';
/**
 * Submit a URL for audio fetch. `url` is any http(s) URL yt-dlp supports.
 * @export
 * @interface SourceRequest
 */
export interface SourceRequest {
    /**
     * 
     * @type {string}
     * @memberof SourceRequest
     */
    url: string;
    /**
     * 
     * @type {number}
     * @memberof SourceRequest
     */
    priority?: number;
    /**
     * 
     * @type {string}
     * @memberof SourceRequest
     */
    webhookUrl?: string | null;
}

/**
 * Check if a given object implements the SourceRequest interface.
 */
export function instanceOfSourceRequest(value: object): value is SourceRequest {
    if (!('url' in value) || value['url'] === undefined) return false;
    return true;
}

export function SourceRequestFromJSON(json: any): SourceRequest {
    return SourceRequestFromJSONTyped(json, false);
}

export function SourceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'url': json['url'],
        'priority': json['priority'] == null ? undefined : json['priority'],
        'webhookUrl': json['webhook_url'] == null ? undefined : json['webhook_url'],
    };
}

export function SourceRequestToJSON(json: any): SourceRequest {
    return SourceRequestToJSONTyped(json, false);
}

export function SourceRequestToJSONTyped(value?: SourceRequest | null, ignoreDiscriminator: boolean = false): any {
    if (value == null) {
        return value;
    }

    return {
        
        'url': value['url'],
        'priority': value['priority'],
        'webhook_url': value['webhookUrl'],
    };
}

