/* tslint:disable */
/* eslint-disable */
/**
 * authentik
 * Making authentication simple.
 *
 * The version of the OpenAPI document: 2025.10.0-rc1
 * Contact: hello@goauthentik.io
 *
 * 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';
/**
 * User source connection
 * @export
 * @interface UserPlexSourceConnectionRequest
 */
export interface UserPlexSourceConnectionRequest {
    /**
     * 
     * @type {number}
     * @memberof UserPlexSourceConnectionRequest
     */
    user: number;
    /**
     * 
     * @type {string}
     * @memberof UserPlexSourceConnectionRequest
     */
    source: string;
    /**
     * 
     * @type {string}
     * @memberof UserPlexSourceConnectionRequest
     */
    identifier: string;
    /**
     * 
     * @type {string}
     * @memberof UserPlexSourceConnectionRequest
     */
    plexToken: string;
}

/**
 * Check if a given object implements the UserPlexSourceConnectionRequest interface.
 */
export function instanceOfUserPlexSourceConnectionRequest(value: object): value is UserPlexSourceConnectionRequest {
    if (!('user' in value) || value['user'] === undefined) return false;
    if (!('source' in value) || value['source'] === undefined) return false;
    if (!('identifier' in value) || value['identifier'] === undefined) return false;
    if (!('plexToken' in value) || value['plexToken'] === undefined) return false;
    return true;
}

export function UserPlexSourceConnectionRequestFromJSON(json: any): UserPlexSourceConnectionRequest {
    return UserPlexSourceConnectionRequestFromJSONTyped(json, false);
}

export function UserPlexSourceConnectionRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UserPlexSourceConnectionRequest {
    if (json == null) {
        return json;
    }
    return {
        
        'user': json['user'],
        'source': json['source'],
        'identifier': json['identifier'],
        'plexToken': json['plex_token'],
    };
}

export function UserPlexSourceConnectionRequestToJSON(json: any): UserPlexSourceConnectionRequest {
    return UserPlexSourceConnectionRequestToJSONTyped(json, false);
}

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

    return {
        
        'user': value['user'],
        'source': value['source'],
        'identifier': value['identifier'],
        'plex_token': value['plexToken'],
    };
}

