src/agent/adu_core_interface/src/agent_workflow.c
ADUC_ContentData* ADUC_ContentData_AllocAndInit(const JSON_Value* updateActionJson)
{
    _Bool succeeded = false;
    ADUC_ContentData* newContentData = calloc(1, sizeof(ADUC_ContentData));
    if (newContentData == NULL)
    {
        goto done;
    }

    if (!ADUC_ContentData_Update(newContentData, updateActionJson, true))
    {
        goto done;
    }

    succeeded = true;

done:
    if (!succeeded)
    {
        ADUC_ContentData_Free(newContentData);
        newContentData = NULL;
    }

    return newContentData;
}
/**
 * @brief Creates and initializes a new ADUC_ContentData object from the provided JSON.
 *
 * @param updateActionJson The JSON to use to populate fields in the ADUC_ContentData object.
 * @return ADUC_ContentData* The new ADUC_ContentData. Must be freed with ADUC_ContentData_Free by caller.
 */
@brief Creates and initializes a new ADUC_ContentData object from the provided JSON.
@param updateActionJson The JSON to use to populate fields in the ADUC_ContentData object.
@brief Creates and initializes a new ADUC_ContentData object from the provided JSON . @param updateActionJson The JSON to use to populate fields in the ADUC_ContentData object .
ADUC_ContentData* ADUC_ContentData_AllocAndInit(const JSON_Value* updateActionJson)
{
    _Bool succeeded = false;
    ADUC_ContentData* newContentData = calloc(1, sizeof(ADUC_ContentData));
    if (newContentData == NULL)
    {
        goto done;
    }
    if (!ADUC_ContentData_Update(newContentData, updateActionJson, true))
    {
        goto done;
    }
    succeeded = true;
done:
    if (!succeeded)
    {
        ADUC_ContentData_Free(newContentData);
        newContentData = NULL;
    }
    return newContentData;
}
ADUC_ContentData * ADUC_ContentData_AllocAndInit ( const JSON_Value * updateActionJson ) { _Bool succeeded = false ; ADUC_ContentData * newContentData = calloc ( 1 , sizeof ( ADUC_ContentData ) ) ; if ( newContentData == NULL ) { goto done ; } if ( ! ADUC_ContentData_Update ( newContentData , updateActionJson , true ) ) { goto done ; } succeeded = true ; done : if ( ! succeeded ) { ADUC_ContentData_Free ( newContentData ) ; newContentData = NULL ; } return newContentData ; }
@brief Creates and initializes a new ADUC_ContentData object from the provided JSON.
@brief Creates and initializes a new ADUC_ContentData object from the provided JSON .