/* tslint:disable */
/* eslint-disable */
/**
 * elkar-app
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * 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';
import type { PushNotificationAuth } from './PushNotificationAuth';
import {
    PushNotificationAuthFromJSON,
    PushNotificationAuthFromJSONTyped,
    PushNotificationAuthToJSON,
    PushNotificationAuthToJSONTyped,
} from './PushNotificationAuth';

/**
 * Push notification configuration
 * @export
 * @interface PushNotificationConfig
 */
export interface PushNotificationConfig {
    /**
     * 
     * @type {PushNotificationAuth}
     * @memberof PushNotificationConfig
     */
    authentication?: PushNotificationAuth | null;
    /**
     * 
     * @type {string}
     * @memberof PushNotificationConfig
     */
    token?: string | null;
    /**
     * 
     * @type {string}
     * @memberof PushNotificationConfig
     */
    url: string;
}

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

export function PushNotificationConfigFromJSON(json: any): PushNotificationConfig {
    return PushNotificationConfigFromJSONTyped(json, false);
}

export function PushNotificationConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): PushNotificationConfig {
    if (json == null) {
        return json;
    }
    return {
        
        'authentication': json['authentication'] == null ? undefined : PushNotificationAuthFromJSON(json['authentication']),
        'token': json['token'] == null ? undefined : json['token'],
        'url': json['url'],
    };
}

export function PushNotificationConfigToJSON(json: any): PushNotificationConfig {
    return PushNotificationConfigToJSONTyped(json, false);
}

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

    return {
        
        'authentication': PushNotificationAuthToJSON(value['authentication']),
        'token': value['token'],
        'url': value['url'],
    };
}

