public ServiceCall < Configuration > updateConfiguration ( UpdateConfigurationOptions updateConfigurationOptions ) { Validator . notNull ( updateConfigurationOptions , "updateConfigurationOptions cannot be null" ) ; String [ ] pathSegments = { "v1/environments" , "configurations" } ; String [ ] pathParameters = { updateConfigurationOptions . environmentId ( ) , updateConfigurationOptions . configurationId ( ) } ; RequestBuilder builder = RequestBuilder . put ( RequestBuilder . constructHttpUrl ( getEndPoint ( ) , pathSegments , pathParameters ) ) ; builder . query ( "version" , versionDate ) ; Map < String , String > sdkHeaders = SdkCommon . getSdkHeaders ( "discovery" , "v1" , "updateConfiguration" ) ; for ( Entry < String , String > header : sdkHeaders . entrySet ( ) ) { builder . header ( header . getKey ( ) , header . getValue ( ) ) ; } builder . header ( "Accept" , "application/json" ) ; final JsonObject contentJson = new JsonObject ( ) ; contentJson . addProperty ( "name" , updateConfigurationOptions . name ( ) ) ; if ( updateConfigurationOptions . description ( ) != null ) { contentJson . addProperty ( "description" , updateConfigurationOptions . description ( ) ) ; } if ( updateConfigurationOptions . conversions ( ) != null ) { contentJson . add ( "conversions" , GsonSingleton . getGson ( ) . toJsonTree ( updateConfigurationOptions . conversions ( ) ) ) ; } if ( updateConfigurationOptions . enrichments ( ) != null ) { contentJson . add ( "enrichments" , GsonSingleton . getGson ( ) . toJsonTree ( updateConfigurationOptions . enrichments ( ) ) ) ; } if ( updateConfigurationOptions . normalizations ( ) != null ) { contentJson . add ( "normalizations" , GsonSingleton . getGson ( ) . toJsonTree ( updateConfigurationOptions . normalizations ( ) ) ) ; } if ( updateConfigurationOptions . source ( ) != null ) { contentJson . add ( "source" , GsonSingleton . getGson ( ) . toJsonTree ( updateConfigurationOptions . source ( ) ) ) ; } builder . bodyJson ( contentJson ) ; return createServiceCall ( builder . build ( ) , ResponseConverterUtils . getObject ( Configuration . class ) ) ; }
Update a configuration .