tvaultapi/src/main/java/com/tmobile/cso/vault/api/service/IAMServiceAccountsService.java
private boolean checkIfAccessKeyExists(JsonArray svcSecretArray, String accessKeyId) {		
		for (int i = 0; i < svcSecretArray.size(); i++) {
			JsonObject iamSecret = (JsonObject) svcSecretArray.get(i);
			if (iamSecret.has(IAMServiceAccountConstants.ACCESS_KEY_ID)) {
				String accessKeyIdFromMetaData = iamSecret.get(IAMServiceAccountConstants.ACCESS_KEY_ID).getAsString();
				if (accessKeyIdFromMetaData.equals((accessKeyId)) ) {
					return true;
				}
			}
		}
		return false;
	}
/**
	 * Method to check if the given access key exists in metadata
	 * @param svcSecretArray
	 * @param accessKeyId
	 * @return
	 */
Method to check if the given access key exists in metadata
@param svcSecretArray
@param accessKeyId
@return
Method to check if the given access key exists in metadata @param svcSecretArray @param accessKeyId @return
private boolean checkIfAccessKeyExists(JsonArray svcSecretArray, String accessKeyId) {		
		for (int i = 0; i < svcSecretArray.size(); i++) {
			JsonObject iamSecret = (JsonObject) svcSecretArray.get(i);
			if (iamSecret.has(IAMServiceAccountConstants.ACCESS_KEY_ID)) {
				String accessKeyIdFromMetaData = iamSecret.get(IAMServiceAccountConstants.ACCESS_KEY_ID).getAsString();
				if (accessKeyIdFromMetaData.equals((accessKeyId)) ) {
					return true;
				}
			}
		}
		return false;
	}
private boolean checkIfAccessKeyExists ( JsonArray svcSecretArray , String accessKeyId ) { for ( int i = 0 ; i < svcSecretArray . size ( ) ; i ++ ) { JsonObject iamSecret = ( JsonObject ) svcSecretArray . get ( i ) ; if ( iamSecret . has ( IAMServiceAccountConstants . ACCESS_KEY_ID ) ) { String accessKeyIdFromMetaData = iamSecret . get ( IAMServiceAccountConstants . ACCESS_KEY_ID ) . getAsString ( ) ; if ( accessKeyIdFromMetaData . equals ( ( accessKeyId ) ) ) { return true ; } } } return false ; }
Method to check if the given access key exists in metadata
 @param svcSecretArray
 @param accessKeyId
 @return
Method to check if the given access key exists in metadata @param svcSecretArray @param accessKeyId @return