Build client configuration.

@param props the props
@return the client configuration
777108
@SneakyThrows
    public static ClientConfiguration buildClientConfiguration(final BaseAmazonWebServicesProperties props) {
        val cfg = new ClientConfiguration();
        cfg.setConnectionTimeout(props.getConnectionTimeout());
        cfg.setMaxConnections(props.getMaxConnections());
        cfg.setRequestTimeout(props.getRequestTimeout());
        cfg.setSocketTimeout(props.getSocketTimeout());
        cfg.setUseGzip(props.isUseGzip());
        cfg.setUseReaper(props.isUseReaper());
        cfg.setUseThrottleRetries(props.isUseThrottleRetries());
        cfg.setUseTcpKeepAlive(props.isUseTcpKeepAlive());
        cfg.setProtocol(Protocol.valueOf(props.getProtocol().toUpperCase()));
        cfg.setClientExecutionTimeout(props.getClientExecutionTimeout());
        if (props.getMaxErrorRetry() > 0) {
            cfg.setMaxErrorRetry(props.getMaxErrorRetry());
        }
        cfg.setProxyHost(props.getProxyHost());
        cfg.setProxyPassword(props.getProxyPassword());
        if (props.getProxyPort() > 0) {
            cfg.setProxyPort(props.getProxyPort());
        }
        cfg.setProxyUsername(props.getProxyUsername());
        cfg.setCacheResponseMetadata(props.isCacheResponseMetadata());

        if (StringUtils.isNotBlank(props.getLocalAddress())) {
            LOGGER.trace("Creating DynamoDb client local address [{}]", props.getLocalAddress());
            cfg.setLocalAddress(InetAddress.getByName(props.getLocalAddress()));
        }

        return cfg;
    }
762621
public static MavenConfiguration getConfig(final File settingsFile, final Properties props) throws Exception {

        props.setProperty(ServiceConstants.PID + MavenConstants.PROPERTY_SETTINGS_FILE, settingsFile.toURI()
                .toASCIIString());

        final MavenConfigurationImpl config = new MavenConfigurationImpl(new PropertiesPropertyResolver(props),
                ServiceConstants.PID);

        final MavenSettings settings = new MavenSettingsImpl(settingsFile.toURI().toURL());

        config.setSettings(settings);

        return config;

    }
803708
public static List<ExtPluginConfiguration> listPluginConfigurations(
            final Map<String, String> props,
            final String keyprefix,
            final String serviceName
    )
    {
        return listPluginConfigurations(props, keyprefix, serviceName, false);

    }
245341
public ClientConfiguration createClientConfiguration() {
        return ClientConfiguration.builder(buildTimeSeriesUrl(), username, password)
                .connectTimeoutMillis(connectTimeoutMillis)
                .readTimeoutMillis(readTimeoutMillis)
                .pingTimeoutMillis(pingTimeoutMillis)
                .ignoreSSLErrors(ignoreSSLErrors)
                .skipStreamingControl(skipStreamingControl)
                .enableBatchCompression(enableGzipCompression)
                .userAgent(userAgent)
                .build();
    }
756699
protected JawrConfig createJawrConfig(Properties props) {
		jawrConfig = new JawrConfig(resourceType, props, configPropResolver);

		// Override properties which are incompatible with the build time bundle
		// processing
		if (ThreadLocalJawrContext.isBundleProcessingAtBuildTime()) {
			jawrConfig.setUseBundleMapping(true);

			// Use the standard working directory
			jawrConfig.setJawrWorkingDirectory(null);
		}

		return jawrConfig;
	}
721200
public ExecutorFactoryConfigurationBuilder withProperties(Properties props) {
      attributes.attribute(PROPERTIES).set(TypedProperties.toTypedProperties(props));
      return this;
   }
574427
protected void configureOidcClient(final Collection<BaseClient> properties) {
        pac4jProperties.getOidc()
            .forEach(oidc -> {
                val client = getOidcClientFrom(oidc);
                LOGGER.debug("Created client [{}]", client);
                properties.add(client);
            });
    }
81635
public Client newClient(String clientName, Collection<JaxRsFeatureGroup> featureGroups) {
        return newBuilder(clientName, featureGroups).build();
    }
402842
@Override
	protected AmazonKinesis createKinesisClient(Properties configProps) {
		ClientConfiguration awsClientConfig = new ClientConfigurationFactory().getConfig();
		setAwsClientConfigProperties(awsClientConfig, configProps);

		AWSCredentialsProvider credentials = getCredentialsProvider(configProps);
		awsClientConfig.setUserAgentPrefix(
				String.format(
						USER_AGENT_FORMAT,
						EnvironmentInformation.getVersion(),
						EnvironmentInformation.getRevisionInformation().commitId));

		AmazonDynamoDBStreamsAdapterClient adapterClient =
				new AmazonDynamoDBStreamsAdapterClient(credentials, awsClientConfig);

		if (configProps.containsKey(AWS_ENDPOINT)) {
			adapterClient.setEndpoint(configProps.getProperty(AWS_ENDPOINT));
		} else {
			adapterClient.setRegion(Region.getRegion(
					Regions.fromName(configProps.getProperty(AWS_REGION))));
		}

		return adapterClient;
	}
1268904
public Data set(Iterable<Property> props) {
        return !Iterables.isEmpty(props)
               ? new Data(props)
               : this;
    }
1337918
private Configuration getClientConf() {
    return HeronClientConfiguration.CONF
        .set(ClientConfiguration.ON_JOB_RUNNING, ReefClientSideHandlers.RunningJobHandler.class)
        .set(ClientConfiguration.ON_JOB_FAILED, ReefClientSideHandlers.FailedJobHandler.class)
        .set(ClientConfiguration.ON_RUNTIME_ERROR, ReefClientSideHandlers.RuntimeErrorHandler.class)
        .set(HeronClientConfiguration.TOPOLOGY_NAME, topologyName)
        .build();
  }
1300768
public static Environment of(@NonNull Properties props) {
        var environment = new Environment();
        environment.props = props;
        return environment;
    }
540076
@SuppressWarnings("rawtypes")
   public static HikariConfig loadConfiguration(Map props)
   {
      Properties hikariProps = new Properties();
      copyProperty(AvailableSettings.ISOLATION, props, "transactionIsolation", hikariProps);
      copyProperty(AvailableSettings.AUTOCOMMIT, props, "autoCommit", hikariProps);
      copyProperty(AvailableSettings.DRIVER, props, "driverClassName", hikariProps);
      copyProperty(AvailableSettings.URL, props, "jdbcUrl", hikariProps);
      copyProperty(AvailableSettings.USER, props, "username", hikariProps);
      copyProperty(AvailableSettings.PASS, props, "password", hikariProps);

      for (Object keyo : props.keySet()) {
         String key = (String) keyo;
         if (key.startsWith(CONFIG_PREFIX)) {
            hikariProps.setProperty(key.substring(CONFIG_PREFIX.length()), (String) props.get(key));
         }
      }

      return new HikariConfig(hikariProps);
   }
380259
public Set<BaseClient> build() {
        val clients = new LinkedHashSet<BaseClient>();

        configureCasClient(clients);
        configureFacebookClient(clients);
        configureOidcClient(clients);
        configureOAuth20Client(clients);
        configureSamlClient(clients);
        configureTwitterClient(clients);
        configureDropBoxClient(clients);
        configureFoursquareClient(clients);
        configureGitHubClient(clients);
        configureGoogleClient(clients);
        configureWindowsLiveClient(clients);
        configureYahooClient(clients);
        configureLinkedInClient(clients);
        configurePayPalClient(clients);
        configureWordPressClient(clients);
        configureBitBucketClient(clients);
        configureOrcidClient(clients);
        configureHiOrgServerClient(clients);

        return clients;
    }
453075
protected void configureHiOrgServerClient(final Collection<BaseClient> properties) {
        val hiOrgServer = pac4jProperties.getHiOrgServer();
        if (StringUtils.isNotBlank(hiOrgServer.getId()) && StringUtils.isNotBlank(hiOrgServer.getSecret())) {
            val client = new HiOrgServerClient(hiOrgServer.getId(), hiOrgServer.getSecret());
            configureClient(client, hiOrgServer);
            if (StringUtils.isNotBlank(hiOrgServer.getScope())) {
                client.getConfiguration().setScope(hiOrgServer.getScope());
            }
            LOGGER.debug("Created client [{}] with identifier [{}]", client.getName(), client.getKey());
            properties.add(client);
        }
    }
140516
public static ExtendedProperties fromProperties(final Properties props) {
		ExtendedProperties result = new ExtendedProperties();
		for (Enumeration<?> en = props.propertyNames(); en.hasMoreElements();) {
			String key = (String) en.nextElement();
			String value = props.getProperty(key);
			result.put(key, value);
		}
		return result;
	}
1018414
protected void loadConfig(Properties props, String path, InputStream is) {
		// load properties into a Properties object
		try {
			props.load(is);
		} catch (IOException e) {
			throw new BundlingProcessException("Unable to load jawr configuration at " + path + ".", e);
		}
	}