@Autowired
private GccCredentialInitializer gccCredentialInitializer;
@Override
public CredentialJson convert(GccCredential entity) {
CredentialJson credentialJson = new CredentialJson();
credentialJson.setId(entity.getId());
credentialJson.setCloudPlatform(CloudPlatform.GCC);
credentialJson.setName(entity.getName());
Map<String, Object> params = new HashMap<>();
params.put(GccCredentialParam.SERVICE_ACCOUNT_ID.getName(), entity.getServiceAccountId());
params.put(GccCredentialParam.SERVICE_ACCOUNT_PRIVATE_KEY.getName(), entity.getServiceAccountPrivateKey());
params.put(GccCredentialParam.PROJECTID.getName(), entity.getProjectId());
credentialJson.setParameters(params);
credentialJson.setDescription(entity.getDescription() == null ? "" : entity.getDescription());
return credentialJson;
}