/* tslint:disable */ /* eslint-disable */ /** * Mubicon v1 API * Api with Swagger, Swashbuckle, and Manual API versioning. * * The version of the OpenAPI document: 1 * Contact: support@mubicloud.com * * 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 { TimeOfDay } from './TimeOfDay'; import { TimeOfDayFromJSON, TimeOfDayFromJSONTyped, TimeOfDayToJSON, TimeOfDayToJSONTyped, } from './TimeOfDay'; import type { CompanyTypeSelection } from './CompanyTypeSelection'; import { CompanyTypeSelectionFromJSON, CompanyTypeSelectionFromJSONTyped, CompanyTypeSelectionToJSON, CompanyTypeSelectionToJSONTyped, } from './CompanyTypeSelection'; import type { GenreSelection } from './GenreSelection'; import { GenreSelectionFromJSON, GenreSelectionFromJSONTyped, GenreSelectionToJSON, GenreSelectionToJSONTyped, } from './GenreSelection'; import type { TrackSelection } from './TrackSelection'; import { TrackSelectionFromJSON, TrackSelectionFromJSONTyped, TrackSelectionToJSON, TrackSelectionToJSONTyped, } from './TrackSelection'; /** * * @export * @interface Selection */ export interface Selection { /** * * @type {number} * @memberof Selection */ selectionId?: number; /** * * @type {string} * @memberof Selection */ name: string; /** * * @type {string} * @memberof Selection */ readonly description?: string | null; /** * * @type {string} * @memberof Selection */ imageFile: string; /** * * @type {TimeOfDay} * @memberof Selection */ timeOfDay: TimeOfDay; /** * * @type {string} * @memberof Selection */ duration?: string; /** * * @type {number} * @memberof Selection */ rating?: number; /** * * @type {number} * @memberof Selection */ ratingCount?: number; /** * * @type {boolean} * @memberof Selection */ random?: boolean; /** * * @type {number} * @memberof Selection */ readonly views?: number; /** * * @type {Date} * @memberof Selection */ createDate?: Date; /** * * @type {Date} * @memberof Selection */ changeDate?: Date; /** * * @type {Array} * @memberof Selection */ trackSelections?: Array | null; /** * * @type {Array} * @memberof Selection */ companyTypeSelections?: Array | null; /** * * @type {Array} * @memberof Selection */ genreSelections?: Array | null; } /** * Check if a given object implements the Selection interface. */ export function instanceOfSelection(value: object): value is Selection { if (!('name' in value) || value['name'] === undefined) return false; if (!('imageFile' in value) || value['imageFile'] === undefined) return false; if (!('timeOfDay' in value) || value['timeOfDay'] === undefined) return false; return true; } export function SelectionFromJSON(json: any): Selection { return SelectionFromJSONTyped(json, false); } export function SelectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): Selection { if (json == null) { return json; } return { 'selectionId': json['SelectionId'] == null ? undefined : json['SelectionId'], 'name': json['Name'], 'description': json['Description'] == null ? undefined : json['Description'], 'imageFile': json['ImageFile'], 'timeOfDay': TimeOfDayFromJSON(json['TimeOfDay']), 'duration': json['Duration'] == null ? undefined : json['Duration'], 'rating': json['Rating'] == null ? undefined : json['Rating'], 'ratingCount': json['RatingCount'] == null ? undefined : json['RatingCount'], 'random': json['Random'] == null ? undefined : json['Random'], 'views': json['Views'] == null ? undefined : json['Views'], 'createDate': json['CreateDate'] == null ? undefined : (new Date(json['CreateDate'])), 'changeDate': json['ChangeDate'] == null ? undefined : (new Date(json['ChangeDate'])), 'trackSelections': json['TrackSelections'] == null ? undefined : ((json['TrackSelections'] as Array).map(TrackSelectionFromJSON)), 'companyTypeSelections': json['CompanyTypeSelections'] == null ? undefined : ((json['CompanyTypeSelections'] as Array).map(CompanyTypeSelectionFromJSON)), 'genreSelections': json['GenreSelections'] == null ? undefined : ((json['GenreSelections'] as Array).map(GenreSelectionFromJSON)), }; } export function SelectionToJSON(json: any): Selection { return SelectionToJSONTyped(json, false); } export function SelectionToJSONTyped(value?: Omit | null, ignoreDiscriminator: boolean = false): any { if (value == null) { return value; } return { 'SelectionId': value['selectionId'], 'Name': value['name'], 'ImageFile': value['imageFile'], 'TimeOfDay': TimeOfDayToJSON(value['timeOfDay']), 'Duration': value['duration'], 'Rating': value['rating'], 'RatingCount': value['ratingCount'], 'Random': value['random'], 'CreateDate': value['createDate'] == null ? undefined : ((value['createDate']).toISOString()), 'ChangeDate': value['changeDate'] == null ? undefined : ((value['changeDate']).toISOString()), 'TrackSelections': value['trackSelections'] == null ? undefined : ((value['trackSelections'] as Array).map(TrackSelectionToJSON)), 'CompanyTypeSelections': value['companyTypeSelections'] == null ? undefined : ((value['companyTypeSelections'] as Array).map(CompanyTypeSelectionToJSON)), 'GenreSelections': value['genreSelections'] == null ? undefined : ((value['genreSelections'] as Array).map(GenreSelectionToJSON)), }; }