/* tslint:disable */
/* eslint-disable */
/**
 * Streaming Availability API
 * Streaming Availability API allows getting streaming availability information of movies and series; and querying the list of available shows on streaming services such as Netflix, Disney+, Apple TV, Max and Hulu across 59 countries!
 *
 * The version of the OpenAPI document: 3.3.1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

import { exists, mapValues } from '../runtime';
/**
 * Details of a genre
 * @export
 * @interface Genre
 */
export interface Genre {
    /**
     * Id of the genre
     * @type {number}
     * @memberof Genre
     */
    id: number;
    /**
     * Name of the genre
     * @type {string}
     * @memberof Genre
     */
    name: string;
}

/**
 * Check if a given object implements the Genre interface.
 */
export function instanceOfGenre(value: object): boolean {
    let isInstance = true;
    isInstance = isInstance && "id" in value;
    isInstance = isInstance && "name" in value;

    return isInstance;
}

export function GenreFromJSON(json: any): Genre {
    return GenreFromJSONTyped(json, false);
}

export function GenreFromJSONTyped(json: any, ignoreDiscriminator: boolean): Genre {
    if ((json === undefined) || (json === null)) {
        return json;
    }
    return {
        
        'id': json['id'],
        'name': json['name'],
    };
}

export function GenreToJSON(value?: Genre | null): any {
    if (value === undefined) {
        return undefined;
    }
    if (value === null) {
        return null;
    }
    return {
        
        'id': value.id,
        'name': value.name,
    };
}

