public ServiceCall < TrainingExample > updateTrainingExample ( UpdateTrainingExampleOptions updateTrainingExampleOptions ) { Validator . notNull ( updateTrainingExampleOptions , "updateTrainingExampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "collections" , "training_data" , "examples" } ; String [ ] pathParameters = { updateTrainingExampleOptions . environmentId ( ) , updateTrainingExampleOptions . collectionId ( ) , updateTrainingExampleOptions . queryId ( ) , updateTrainingExampleOptions . exampleId ( ) } ; RequestBuilder builder = RequestBuilder . put ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "updateTrainingExample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateTrainingExampleOptions . crossReference ( ) != null ) { contentJson . addProperty ( "cross_reference" , updateTrainingExampleOptions . crossReference ( ) ) ; } if ( updateTrainingExampleOptions . relevance ( ) != null ) { contentJson . addProperty ( "relevance" , updateTrainingExampleOptions . relevance ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( TrainingExample . class ) ) ; }
Change label or cross reference for example .