public ServiceCall < Value > updateValue ( UpdateValueOptions updateValueOptions ) { Validator . notNull ( updateValueOptions , "updateValueOptions cannot be null" ) ; String [ ] pathSegments = { "v1/workspaces" , "entities" , "values" } ; String [ ] pathParameters = { updateValueOptions . workspaceId ( ) , updateValueOptions . entity ( ) , updateValueOptions . value ( ) } ; RequestBuilder builder = RequestBuilder . post ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "conversation" , "v1" , "updateValue" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; if ( updateValueOptions . newValue ( ) != null ) { contentJson . addProperty ( "value" , updateValueOptions . newValue ( ) ) ; } if ( updateValueOptions . newMetadata ( ) != null ) { contentJson . add ( "metadata" , GsonSingleton . getGson ( ) . toJsonTree ( updateValueOptions . newMetadata ( ) ) ) ; } if ( updateValueOptions . valueType ( ) != null ) { contentJson . addProperty ( "type" , updateValueOptions . valueType ( ) ) ; } if ( updateValueOptions . newSynonyms ( ) != null ) { contentJson . add ( "synonyms" , GsonSingleton . getGson ( ) . toJsonTree ( updateValueOptions . newSynonyms ( ) ) ) ; } if ( updateValueOptions . newPatterns ( ) != null ) { contentJson . add ( "patterns" , GsonSingleton . getGson ( ) . toJsonTree ( updateValueOptions . newPatterns ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Value . class ) ) ; }
Update entity value .