}
private Map<ConstraintKey, String> loadConnectionConstraints(
final CloudProviderConnectionMetadata metadata)
{
FieldConstraint endpoint = FieldConstraint.NO_APPLICABLE;
FieldConstraint credentials = FieldConstraint.NO_APPLICABLE;
if (metadata != null)
{
endpoint = metadata.endpoint();
credentials = metadata.credentials();
}
return ImmutableMap.<ConstraintKey, String> builder()
.put(ConstraintKey.ENDPOINT, endpoint.name())
.put(ConstraintKey.PROVIDER_CREDENTIALS, credentials.name()).build();
}