public ServiceCall < Void > updateVoiceModel ( UpdateVoiceModelOptions updateVoiceModelOptions ) { Validator . notNull ( updateVoiceModelOptions , "updateVoiceModelOptions cannot be null" ) ; String [ ] pathSegments = { "v1/customizations" } ; String [ ] pathParameters = { updateVoiceModelOptions . customizationId ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "text_to_speech" , "v1" , "updateVoiceModel" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateVoiceModelOptions . name ( ) != null ) { contentJson . addProperty ( "name" , updateVoiceModelOptions . name ( ) ) ; } if ( updateVoiceModelOptions . description ( ) != null ) { contentJson . addProperty ( "description" , updateVoiceModelOptions . description ( ) ) ; } if ( updateVoiceModelOptions . words ( ) != null ) { contentJson . add ( "words" , GsonSingleton . getGson ( ) . toJsonTree ( updateVoiceModelOptions . words ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getVoid ( ) ) ; }
Update a custom model .