io.gravitee.apim.common.mapper.SslOptionsMapperImpl Maven / Gradle / Ivy
The newest version!
package io.gravitee.apim.common.mapper;
import io.gravitee.node.vertx.client.ssl.SslOptions;
import javax.annotation.processing.Generated;
@Generated(
value = "org.mapstruct.ap.MappingProcessor",
date = "2024-09-13T14:10:48+0000",
comments = "version: 1.6.0.Beta2, compiler: javac, environment: Java 17.0.8 (Eclipse Adoptium)"
)
public class SslOptionsMapperImpl implements SslOptionsMapper {
private final KeyStoreMapper keyStoreMapper = KeyStoreMapper.INSTANCE;
private final TrustStoreMapper trustStoreMapper = TrustStoreMapper.INSTANCE;
@Override
public SslOptions map(io.gravitee.definition.model.v4.ssl.SslOptions httpProxyOptions) {
if ( httpProxyOptions == null ) {
return null;
}
SslOptions.SslOptionsBuilder sslOptions = SslOptions.builder();
sslOptions.trustAll( httpProxyOptions.isTrustAll() );
sslOptions.hostnameVerifier( httpProxyOptions.isHostnameVerifier() );
sslOptions.trustStore( trustStoreMapper.map( httpProxyOptions.getTrustStore() ) );
sslOptions.keyStore( keyStoreMapper.map( httpProxyOptions.getKeyStore() ) );
return sslOptions.build();
}
}