/**
 * VOICEVOX ENGINE
 * VOICEVOXの音声合成エンジンです。
 *
 * The version of the OpenAPI document: 0.10.preview.2
 *
 *
 * 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' ; import { SpeakerStyle , SpeakerStyleFromJSON , SpeakerStyleFromJSONTyped , SpeakerStyleToJSON , } from './' ; export interface export interface Speaker { type { string } memberof name : string ; type { string } memberof speakerUuid : string ; type { Array < SpeakerStyle > } memberof styles : Array < SpeakerStyle > ; type { string } memberof version ? : string ; } export function SpeakerFromJSON ( json ) { return SpeakerFromJSONTyped ( json , false ) ; } export function SpeakerFromJSONTyped ( json , ignoreDiscriminator ) { if ( ( json === undefined ) || ( json === null ) ) { return json ; } return { 'name' : json [ 'name' ] , 'speakerUuid' : json [ 'speaker_uuid' ] , 'styles' : ( ( json [ 'styles' ] as Array < any > ) . map ( SpeakerStyleFromJSON ) ) , 'version' : ! exists ( json , 'version' ) ? undefined : json [ 'version' ] , } ; } export function SpeakerToJSON ( value ? ) { if ( value === undefined ) { return undefined ; } if ( value === null ) { return null ; } return { 'name' : value . name , 'speaker_uuid' : value . speakerUuid , 'styles' : ( ( value . styles as Array < any > ) . map ( SpeakerStyleToJSON ) ) , 'version' : value . version , } ; }