/* 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 60 countries!
 *
 * The version of the OpenAPI document: 4.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';
/**
 * Price of the renting or buying the item.
 * 
 * A movie and an episode that is available to buy or rent will always have a price.
 * 
 * A series or a season that is available to buy or rent may have a price or not.
 * If the price is available, that means the entire series or the season can be bought or rented as a whole
 * for the given price.
 * If the price is null, that means sub-items of the series or the season are available to buy or rent,
 * but it is not possible to buy or rent the entire series or the season as a whole at once.
 * In this case, the price of the sub-items can be found in the episodes or seasons array.
 * 
 * @export
 * @interface Price
 */
export interface Price {
    /**
     * Numerical amount of the price.
     * @type {string}
     * @memberof Price
     */
    amount: string;
    /**
     * [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) alphabetic code of the currency.
     * @type {string}
     * @memberof Price
     */
    currency: string;
    /**
     * Formatted price, including both the amount and the currency.
     * @type {string}
     * @memberof Price
     */
    formatted: string;
}

/**
 * Check if a given object implements the Price interface.
 */
export function instanceOfPrice(value: object): boolean {
    if (!('amount' in value)) return false;
    if (!('currency' in value)) return false;
    if (!('formatted' in value)) return false;
    return true;
}

export function PriceFromJSON(json: any): Price {
    return PriceFromJSONTyped(json, false);
}

export function PriceFromJSONTyped(json: any, ignoreDiscriminator: boolean): Price {
    if (json == null) {
        return json;
    }
    return {
        
        'amount': json['amount'],
        'currency': json['currency'],
        'formatted': json['formatted'],
    };
}

export function PriceToJSON(value?: Price | null): any {
    if (value == null) {
        return value;
    }
    return {
        
        'amount': value['amount'],
        'currency': value['currency'],
        'formatted': value['formatted'],
    };
}

