public ServiceCall < Counterexample > updateCounterexample ( UpdateCounterexampleOptions updateCounterexampleOptions ) { Validator . notNull ( updateCounterexampleOptions , "updateCounterexampleOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "counterexamples" } ; String [ ] pathParameters = { updateCounterexampleOptions . workspaceId ( ) , updateCounterexampleOptions . text ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateCounterexample" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateCounterexampleOptions . newText ( ) != null ) { contentJson . addProperty ( "text" , updateCounterexampleOptions . newText ( ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Counterexample . class ) ) ; }
Update counterexample .