protected final < T extends AmazonWebServiceRequest > T copyBaseTo ( T target ) { if ( customRequestHeaders != null ) { for ( Map . Entry < String , String > e : customRequestHeaders . entrySet ( ) ) target . putCustomRequestHeader ( . getKey ( ) , . getValue ( ) ) ; } if ( customQueryParameters != null ) { for ( Map . Entry < String , List < String > > e : customQueryParameters . entrySet ( ) ) { if ( e . getValue ( ) != null ) { for ( String value : e . getValue ( ) ) { target . putCustomQueryParameter ( e . getKey ( ) , value ) ; } } } } target . setRequestCredentialsProvider ( credentialsProvider ) ; target . setGeneralProgressListener ( progressListener ) ; target . setRequestMetricCollector ( requestMetricCollector ) ; requestClientOptions . copyTo ( target . getRequestClientOptions ( ) ) ; return target ; }
Copies the internal state of this base class to that of the target request .