clients/c/generated/api/BlueOceanAPI.c
char*
BlueOceanAPI_getPipelineRunLog(apiClient_t *apiClient, char * organization , char * pipeline , char * run , int start , int download )
{
    list_t    *localVarQueryParameters = list_createList();
    list_t    *localVarHeaderParameters = NULL;
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = NULL;
    char      *localVarBodyParameters = NULL;

    // create the path
    long sizeOfPath = strlen("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log");


    // Path Params
    long sizeOfPathParams_organization = strlen(organization)+3 + strlen(pipeline)+3 + strlen(run)+3 + strlen("{ organization }");
    if(organization == NULL) {
        goto end;
    }
    char* localVarToReplace_organization = malloc(sizeOfPathParams_organization);
    sprintf(localVarToReplace_organization, "{%s}", "organization");

    localVarPath = strReplace(localVarPath, localVarToReplace_organization, organization);

    // Path Params
    long sizeOfPathParams_pipeline = strlen(organization)+3 + strlen(pipeline)+3 + strlen(run)+3 + strlen("{ pipeline }");
    if(pipeline == NULL) {
        goto end;
    }
    char* localVarToReplace_pipeline = malloc(sizeOfPathParams_pipeline);
    sprintf(localVarToReplace_pipeline, "{%s}", "pipeline");

    localVarPath = strReplace(localVarPath, localVarToReplace_pipeline, pipeline);

    // Path Params
    long sizeOfPathParams_run = strlen(organization)+3 + strlen(pipeline)+3 + strlen(run)+3 + strlen("{ run }");
    if(run == NULL) {
        goto end;
    }
    char* localVarToReplace_run = malloc(sizeOfPathParams_run);
    sprintf(localVarToReplace_run, "{%s}", "run");

    localVarPath = strReplace(localVarPath, localVarToReplace_run, run);



    // query parameters
    char *keyQuery_start = NULL;
    char * valueQuery_start = NULL;
    keyValuePair_t *keyPairQuery_start = 0;
    if (start)
    {
        keyQuery_start = strdup("start");
        valueQuery_start = calloc(1,MAX_NUMBER_LENGTH);
        snprintf(valueQuery_start, MAX_NUMBER_LENGTH, "%d", start);
        keyPairQuery_start = keyValuePair_create(keyQuery_start, valueQuery_start);
        list_addElement(localVarQueryParameters,keyPairQuery_start);
    }

    // query parameters
    char *keyQuery_download = NULL;
    char * valueQuery_download = NULL;
    keyValuePair_t *keyPairQuery_download = 0;
    if (download)
    {
        keyQuery_download = strdup("download");
        valueQuery_download = calloc(1,MAX_NUMBER_LENGTH);
        snprintf(valueQuery_download, MAX_NUMBER_LENGTH, "%d", download);
        keyPairQuery_download = keyValuePair_create(keyQuery_download, valueQuery_download);
        list_addElement(localVarQueryParameters,keyPairQuery_download);
    }
    list_addElement(localVarHeaderType,"application/json"); //produces
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "GET");

    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully retrieved pipeline run log");
    }
    if (apiClient->response_code == 401) {
        printf("%s\n","Authentication failed - incorrect username and/or password");
    }
    if (apiClient->response_code == 403) {
        printf("%s\n","Jenkins requires authentication - please set username and password");
    }
    //primitive return type simple
    char* elementToReturn =  strdup((char*)apiClient->dataReceived);

    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    list_freeList(localVarQueryParameters);
    
    
    list_freeList(localVarHeaderType);
    
    free(localVarPath);
    free(localVarToReplace_organization);
    free(localVarToReplace_pipeline);
    free(localVarToReplace_run);
    if(keyQuery_start){
        free(keyQuery_start);
        keyQuery_start = NULL;
    }
    if(valueQuery_start){
        free(valueQuery_start);
        valueQuery_start = NULL;
    }
    if(keyPairQuery_start){
        keyValuePair_free(keyPairQuery_start);
        keyPairQuery_start = NULL;
    }
    if(keyQuery_download){
        free(keyQuery_download);
        keyQuery_download = NULL;
    }
    if(valueQuery_download){
        free(valueQuery_download);
        valueQuery_download = NULL;
    }
    if(keyPairQuery_download){
        keyValuePair_free(keyPairQuery_download);
        keyPairQuery_download = NULL;
    }
    return elementToReturn;
end:
    free(localVarPath);
    return NULL;

}
// Get log for a pipeline run
//
Get log for a pipeline run
Get log for a pipeline run
char*
BlueOceanAPI_getPipelineRunLog(apiClient_t *apiClient, char * organization , char * pipeline , char * run , int start , int download )
{
    list_t    *localVarQueryParameters = list_createList();
    list_t    *localVarHeaderParameters = NULL;
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = NULL;
    char      *localVarBodyParameters = NULL;
    long sizeOfPath = strlen("/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/blue/rest/organizations/{organization}/pipelines/{pipeline}/runs/{run}/log");
    long sizeOfPathParams_organization = strlen(organization)+3 + strlen(pipeline)+3 + strlen(run)+3 + strlen("{ organization }");
    if(organization == NULL) {
        goto end;
    }
    char* localVarToReplace_organization = malloc(sizeOfPathParams_organization);
    sprintf(localVarToReplace_organization, "{%s}", "organization");
    localVarPath = strReplace(localVarPath, localVarToReplace_organization, organization);
    long sizeOfPathParams_pipeline = strlen(organization)+3 + strlen(pipeline)+3 + strlen(run)+3 + strlen("{ pipeline }");
    if(pipeline == NULL) {
        goto end;
    }
    char* localVarToReplace_pipeline = malloc(sizeOfPathParams_pipeline);
    sprintf(localVarToReplace_pipeline, "{%s}", "pipeline");
    localVarPath = strReplace(localVarPath, localVarToReplace_pipeline, pipeline);
    long sizeOfPathParams_run = strlen(organization)+3 + strlen(pipeline)+3 + strlen(run)+3 + strlen("{ run }");
    if(run == NULL) {
        goto end;
    }
    char* localVarToReplace_run = malloc(sizeOfPathParams_run);
    sprintf(localVarToReplace_run, "{%s}", "run");
    localVarPath = strReplace(localVarPath, localVarToReplace_run, run);
    char *keyQuery_start = NULL;
    char * valueQuery_start = NULL;
    keyValuePair_t *keyPairQuery_start = 0;
    if (start)
    {
        keyQuery_start = strdup("start");
        valueQuery_start = calloc(1,MAX_NUMBER_LENGTH);
        snprintf(valueQuery_start, MAX_NUMBER_LENGTH, "%d", start);
        keyPairQuery_start = keyValuePair_create(keyQuery_start, valueQuery_start);
        list_addElement(localVarQueryParameters,keyPairQuery_start);
    }
    char *keyQuery_download = NULL;
    char * valueQuery_download = NULL;
    keyValuePair_t *keyPairQuery_download = 0;
    if (download)
    {
        keyQuery_download = strdup("download");
        valueQuery_download = calloc(1,MAX_NUMBER_LENGTH);
        snprintf(valueQuery_download, MAX_NUMBER_LENGTH, "%d", download);
        keyPairQuery_download = keyValuePair_create(keyQuery_download, valueQuery_download);
        list_addElement(localVarQueryParameters,keyPairQuery_download);
    }
    list_addElement(localVarHeaderType,"application/json"); 
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "GET");
    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully retrieved pipeline run log");
    }
    if (apiClient->response_code == 401) {
        printf("%s\n","Authentication failed - incorrect username and/or password");
    }
    if (apiClient->response_code == 403) {
        printf("%s\n","Jenkins requires authentication - please set username and password");
    }
    char* elementToReturn =  strdup((char*)apiClient->dataReceived);
    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    list_freeList(localVarQueryParameters);
    list_freeList(localVarHeaderType);
    free(localVarPath);
    free(localVarToReplace_organization);
    free(localVarToReplace_pipeline);
    free(localVarToReplace_run);
    if(keyQuery_start){
        free(keyQuery_start);
        keyQuery_start = NULL;
    }
    if(valueQuery_start){
        free(valueQuery_start);
        valueQuery_start = NULL;
    }
    if(keyPairQuery_start){
        keyValuePair_free(keyPairQuery_start);
        keyPairQuery_start = NULL;
    }
    if(keyQuery_download){
        free(keyQuery_download);
        keyQuery_download = NULL;
    }
    if(valueQuery_download){
        free(valueQuery_download);
        valueQuery_download = NULL;
    }
    if(keyPairQuery_download){
        keyValuePair_free(keyPairQuery_download);
        keyPairQuery_download = NULL;
    }
    return elementToReturn;
end:
    free(localVarPath);
    return NULL;
}
char * BlueOceanAPI_getPipelineRunLog ( apiClient_t * apiClient , char * organization , char * pipeline , char * run , int start , int download ) { list_t * localVarQueryParameters = list_createList ( ) ; list_t * localVarHeaderParameters = NULL ; list_t * localVarFormParameters = NULL ; list_t * localVarHeaderType = list_createList ( ) ; list_t * localVarContentType = NULL ; char * localVarBodyParameters = NULL ; long sizeOfPath = strlen ( " " ) + 1 ; char * localVarPath = malloc ( sizeOfPath ) ; snprintf ( localVarPath , sizeOfPath , " " ) ; long sizeOfPathParams_organization = strlen ( organization ) + 3 + strlen ( pipeline ) + 3 + strlen ( run ) + 3 + strlen ( " " ) ; if ( organization == NULL ) { goto end ; } char * localVarToReplace_organization = malloc ( sizeOfPathParams_organization ) ; sprintf ( localVarToReplace_organization , " " , " " ) ; localVarPath = strReplace ( localVarPath , localVarToReplace_organization , organization ) ; long sizeOfPathParams_pipeline = strlen ( organization ) + 3 + strlen ( pipeline ) + 3 + strlen ( run ) + 3 + strlen ( " " ) ; if ( pipeline == NULL ) { goto end ; } char * localVarToReplace_pipeline = malloc ( sizeOfPathParams_pipeline ) ; sprintf ( localVarToReplace_pipeline , " " , " " ) ; localVarPath = strReplace ( localVarPath , localVarToReplace_pipeline , pipeline ) ; long sizeOfPathParams_run = strlen ( organization ) + 3 + strlen ( pipeline ) + 3 + strlen ( run ) + 3 + strlen ( " " ) ; if ( run == NULL ) { goto end ; } char * localVarToReplace_run = malloc ( sizeOfPathParams_run ) ; sprintf ( localVarToReplace_run , " " , " " ) ; localVarPath = strReplace ( localVarPath , localVarToReplace_run , run ) ; char * keyQuery_start = NULL ; char * valueQuery_start = NULL ; keyValuePair_t * keyPairQuery_start = 0 ; if ( start ) { keyQuery_start = strdup ( " " ) ; valueQuery_start = calloc ( 1 , MAX_NUMBER_LENGTH ) ; snprintf ( valueQuery_start , MAX_NUMBER_LENGTH , " " , start ) ; keyPairQuery_start = keyValuePair_create ( keyQuery_start , valueQuery_start ) ; list_addElement ( localVarQueryParameters , keyPairQuery_start ) ; } char * keyQuery_download = NULL ; char * valueQuery_download = NULL ; keyValuePair_t * keyPairQuery_download = 0 ; if ( download ) { keyQuery_download = strdup ( " " ) ; valueQuery_download = calloc ( 1 , MAX_NUMBER_LENGTH ) ; snprintf ( valueQuery_download , MAX_NUMBER_LENGTH , " " , download ) ; keyPairQuery_download = keyValuePair_create ( keyQuery_download , valueQuery_download ) ; list_addElement ( localVarQueryParameters , keyPairQuery_download ) ; } list_addElement ( localVarHeaderType , " " ) ; apiClient_invoke ( apiClient , localVarPath , localVarQueryParameters , localVarHeaderParameters , localVarFormParameters , localVarHeaderType , localVarContentType , localVarBodyParameters , " " ) ; if ( apiClient -> response_code == 200 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 401 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 403 ) { printf ( " \n " , " " ) ; } char * elementToReturn = strdup ( ( char * ) apiClient -> dataReceived ) ; if ( apiClient -> dataReceived ) { free ( apiClient -> dataReceived ) ; apiClient -> dataReceived = NULL ; apiClient -> dataReceivedLen = 0 ; } list_freeList ( localVarQueryParameters ) ; list_freeList ( localVarHeaderType ) ; free ( localVarPath ) ; free ( localVarToReplace_organization ) ; free ( localVarToReplace_pipeline ) ; free ( localVarToReplace_run ) ; if ( keyQuery_start ) { free ( keyQuery_start ) ; keyQuery_start = NULL ; } if ( valueQuery_start ) { free ( valueQuery_start ) ; valueQuery_start = NULL ; } if ( keyPairQuery_start ) { keyValuePair_free ( keyPairQuery_start ) ; keyPairQuery_start = NULL ; } if ( keyQuery_download ) { free ( keyQuery_download ) ; keyQuery_download = NULL ; } if ( valueQuery_download ) { free ( valueQuery_download ) ; valueQuery_download = NULL ; } if ( keyPairQuery_download ) { keyValuePair_free ( keyPairQuery_download ) ; keyPairQuery_download = NULL ; } return elementToReturn ; end : free ( localVarPath ) ; return NULL ; }
Get log for a pipeline run
Get log for a pipeline run
// create the path // Path Params // Path Params // Path Params // query parameters // query parameters //produces //primitive return type simple