clients/c/generated/api/RemoteAccessAPI.c
void
RemoteAccessAPI_postCreateView(apiClient_t *apiClient, char * name , char * Jenkins_Crumb , char * Content_Type , char * body )
{
    list_t    *localVarQueryParameters = list_createList();
    list_t    *localVarHeaderParameters = list_createList();
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = list_createList();
    char      *localVarBodyParameters = NULL;

    // create the path
    long sizeOfPath = strlen("/createView")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/createView");




    // header parameters
    char *keyHeader_Jenkins_Crumb = NULL;
    char * valueHeader_Jenkins_Crumb = 0;
    keyValuePair_t *keyPairHeader_Jenkins_Crumb = 0;
    if (Jenkins_Crumb) {
        keyHeader_Jenkins_Crumb = strdup("Jenkins-Crumb");
        valueHeader_Jenkins_Crumb = strdup((Jenkins_Crumb));
        keyPairHeader_Jenkins_Crumb = keyValuePair_create(keyHeader_Jenkins_Crumb, valueHeader_Jenkins_Crumb);
        list_addElement(localVarHeaderParameters,keyPairHeader_Jenkins_Crumb);
    }


    // header parameters
    char *keyHeader_Content_Type = NULL;
    char * valueHeader_Content_Type = 0;
    keyValuePair_t *keyPairHeader_Content_Type = 0;
    if (Content_Type) {
        keyHeader_Content_Type = strdup("Content-Type");
        valueHeader_Content_Type = strdup((Content_Type));
        keyPairHeader_Content_Type = keyValuePair_create(keyHeader_Content_Type, valueHeader_Content_Type);
        list_addElement(localVarHeaderParameters,keyPairHeader_Content_Type);
    }


    // query parameters
    char *keyQuery_name = NULL;
    char * valueQuery_name = NULL;
    keyValuePair_t *keyPairQuery_name = 0;
    if (name)
    {
        keyQuery_name = strdup("name");
        valueQuery_name = strdup((name));
        keyPairQuery_name = keyValuePair_create(keyQuery_name, valueQuery_name);
        list_addElement(localVarQueryParameters,keyPairQuery_name);
    }

    // Body Param
    cJSON *localVarSingleItemJSON_body = NULL;
    if (body != NULL)
    {
        //string
        localVarSingleItemJSON_body = char_convertToJSON(body);
        localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body);
    }
    list_addElement(localVarHeaderType,"*/*"); //produces
    list_addElement(localVarContentType,"application/json"); //consumes
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "POST");

    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully created the view");
    }
    if (apiClient->response_code == 400) {
        printf("%s\n","An error has occurred - error message is embedded inside the HTML response");
    }
    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");
    }
    //No return type
end:
    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    list_freeList(localVarQueryParameters);
    list_freeList(localVarHeaderParameters);
    
    list_freeList(localVarHeaderType);
    list_freeList(localVarContentType);
    free(localVarPath);
    if (keyHeader_Jenkins_Crumb) {
        free(keyHeader_Jenkins_Crumb);
        keyHeader_Jenkins_Crumb = NULL;
    }
    if (valueHeader_Jenkins_Crumb) {
        free(valueHeader_Jenkins_Crumb);
        valueHeader_Jenkins_Crumb = NULL;
    }
    free(keyPairHeader_Jenkins_Crumb);
    if (keyHeader_Content_Type) {
        free(keyHeader_Content_Type);
        keyHeader_Content_Type = NULL;
    }
    if (valueHeader_Content_Type) {
        free(valueHeader_Content_Type);
        valueHeader_Content_Type = NULL;
    }
    free(keyPairHeader_Content_Type);
    if (localVarSingleItemJSON_body) {
        cJSON_Delete(localVarSingleItemJSON_body);
        localVarSingleItemJSON_body = NULL;
    }
    free(localVarBodyParameters);
    if(keyQuery_name){
        free(keyQuery_name);
        keyQuery_name = NULL;
    }
    if(valueQuery_name){
        free(valueQuery_name);
        valueQuery_name = NULL;
    }
    if(keyPairQuery_name){
        keyValuePair_free(keyPairQuery_name);
        keyPairQuery_name = NULL;
    }
    if(keyQuery_name){
        free(keyQuery_name);
        keyQuery_name = NULL;
    }
    if(keyPairQuery_name){
        keyValuePair_free(keyPairQuery_name);
        keyPairQuery_name = NULL;
    }

}
// Create a new view using view configuration
//
Create a new view using view configuration
Create a new view using view configuration
void
RemoteAccessAPI_postCreateView(apiClient_t *apiClient, char * name , char * Jenkins_Crumb , char * Content_Type , char * body )
{
    list_t    *localVarQueryParameters = list_createList();
    list_t    *localVarHeaderParameters = list_createList();
    list_t    *localVarFormParameters = NULL;
    list_t *localVarHeaderType = list_createList();
    list_t *localVarContentType = list_createList();
    char      *localVarBodyParameters = NULL;
    long sizeOfPath = strlen("/createView")+1;
    char *localVarPath = malloc(sizeOfPath);
    snprintf(localVarPath, sizeOfPath, "/createView");
    char *keyHeader_Jenkins_Crumb = NULL;
    char * valueHeader_Jenkins_Crumb = 0;
    keyValuePair_t *keyPairHeader_Jenkins_Crumb = 0;
    if (Jenkins_Crumb) {
        keyHeader_Jenkins_Crumb = strdup("Jenkins-Crumb");
        valueHeader_Jenkins_Crumb = strdup((Jenkins_Crumb));
        keyPairHeader_Jenkins_Crumb = keyValuePair_create(keyHeader_Jenkins_Crumb, valueHeader_Jenkins_Crumb);
        list_addElement(localVarHeaderParameters,keyPairHeader_Jenkins_Crumb);
    }
    char *keyHeader_Content_Type = NULL;
    char * valueHeader_Content_Type = 0;
    keyValuePair_t *keyPairHeader_Content_Type = 0;
    if (Content_Type) {
        keyHeader_Content_Type = strdup("Content-Type");
        valueHeader_Content_Type = strdup((Content_Type));
        keyPairHeader_Content_Type = keyValuePair_create(keyHeader_Content_Type, valueHeader_Content_Type);
        list_addElement(localVarHeaderParameters,keyPairHeader_Content_Type);
    }
    char *keyQuery_name = NULL;
    char * valueQuery_name = NULL;
    keyValuePair_t *keyPairQuery_name = 0;
    if (name)
    {
        keyQuery_name = strdup("name");
        valueQuery_name = strdup((name));
        keyPairQuery_name = keyValuePair_create(keyQuery_name, valueQuery_name);
        list_addElement(localVarQueryParameters,keyPairQuery_name);
    }
    cJSON *localVarSingleItemJSON_body = NULL;
    if (body != NULL)
    {
        localVarSingleItemJSON_body = char_convertToJSON(body);
        localVarBodyParameters = cJSON_Print(localVarSingleItemJSON_body);
    }
    list_addElement(localVarHeaderType,"*/*"); 
    list_addElement(localVarContentType,"application/json"); 
    apiClient_invoke(apiClient,
                    localVarPath,
                    localVarQueryParameters,
                    localVarHeaderParameters,
                    localVarFormParameters,
                    localVarHeaderType,
                    localVarContentType,
                    localVarBodyParameters,
                    "POST");
    if (apiClient->response_code == 200) {
        printf("%s\n","Successfully created the view");
    }
    if (apiClient->response_code == 400) {
        printf("%s\n","An error has occurred - error message is embedded inside the HTML response");
    }
    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");
    }
end:
    if (apiClient->dataReceived) {
        free(apiClient->dataReceived);
        apiClient->dataReceived = NULL;
        apiClient->dataReceivedLen = 0;
    }
    list_freeList(localVarQueryParameters);
    list_freeList(localVarHeaderParameters);
    list_freeList(localVarHeaderType);
    list_freeList(localVarContentType);
    free(localVarPath);
    if (keyHeader_Jenkins_Crumb) {
        free(keyHeader_Jenkins_Crumb);
        keyHeader_Jenkins_Crumb = NULL;
    }
    if (valueHeader_Jenkins_Crumb) {
        free(valueHeader_Jenkins_Crumb);
        valueHeader_Jenkins_Crumb = NULL;
    }
    free(keyPairHeader_Jenkins_Crumb);
    if (keyHeader_Content_Type) {
        free(keyHeader_Content_Type);
        keyHeader_Content_Type = NULL;
    }
    if (valueHeader_Content_Type) {
        free(valueHeader_Content_Type);
        valueHeader_Content_Type = NULL;
    }
    free(keyPairHeader_Content_Type);
    if (localVarSingleItemJSON_body) {
        cJSON_Delete(localVarSingleItemJSON_body);
        localVarSingleItemJSON_body = NULL;
    }
    free(localVarBodyParameters);
    if(keyQuery_name){
        free(keyQuery_name);
        keyQuery_name = NULL;
    }
    if(valueQuery_name){
        free(valueQuery_name);
        valueQuery_name = NULL;
    }
    if(keyPairQuery_name){
        keyValuePair_free(keyPairQuery_name);
        keyPairQuery_name = NULL;
    }
    if(keyQuery_name){
        free(keyQuery_name);
        keyQuery_name = NULL;
    }
    if(keyPairQuery_name){
        keyValuePair_free(keyPairQuery_name);
        keyPairQuery_name = NULL;
    }
}
void RemoteAccessAPI_postCreateView ( apiClient_t * apiClient , char * name , char * Jenkins_Crumb , char * Content_Type , char * body ) { list_t * localVarQueryParameters = list_createList ( ) ; list_t * localVarHeaderParameters = list_createList ( ) ; list_t * localVarFormParameters = NULL ; list_t * localVarHeaderType = list_createList ( ) ; list_t * localVarContentType = list_createList ( ) ; char * localVarBodyParameters = NULL ; long sizeOfPath = strlen ( " " ) + 1 ; char * localVarPath = malloc ( sizeOfPath ) ; snprintf ( localVarPath , sizeOfPath , " " ) ; char * keyHeader_Jenkins_Crumb = NULL ; char * valueHeader_Jenkins_Crumb = 0 ; keyValuePair_t * keyPairHeader_Jenkins_Crumb = 0 ; if ( Jenkins_Crumb ) { keyHeader_Jenkins_Crumb = strdup ( " " ) ; valueHeader_Jenkins_Crumb = strdup ( ( Jenkins_Crumb ) ) ; keyPairHeader_Jenkins_Crumb = keyValuePair_create ( keyHeader_Jenkins_Crumb , valueHeader_Jenkins_Crumb ) ; list_addElement ( localVarHeaderParameters , keyPairHeader_Jenkins_Crumb ) ; } char * keyHeader_Content_Type = NULL ; char * valueHeader_Content_Type = 0 ; keyValuePair_t * keyPairHeader_Content_Type = 0 ; if ( Content_Type ) { keyHeader_Content_Type = strdup ( " " ) ; valueHeader_Content_Type = strdup ( ( Content_Type ) ) ; keyPairHeader_Content_Type = keyValuePair_create ( keyHeader_Content_Type , valueHeader_Content_Type ) ; list_addElement ( localVarHeaderParameters , keyPairHeader_Content_Type ) ; } char * keyQuery_name = NULL ; char * valueQuery_name = NULL ; keyValuePair_t * keyPairQuery_name = 0 ; if ( name ) { keyQuery_name = strdup ( " " ) ; valueQuery_name = strdup ( ( name ) ) ; keyPairQuery_name = keyValuePair_create ( keyQuery_name , valueQuery_name ) ; list_addElement ( localVarQueryParameters , keyPairQuery_name ) ; } cJSON * localVarSingleItemJSON_body = NULL ; if ( body != NULL ) { localVarSingleItemJSON_body = char_convertToJSON ( body ) ; localVarBodyParameters = cJSON_Print ( localVarSingleItemJSON_body ) ; } list_addElement ( localVarHeaderType , " " ) ; list_addElement ( localVarContentType , " " ) ; apiClient_invoke ( apiClient , localVarPath , localVarQueryParameters , localVarHeaderParameters , localVarFormParameters , localVarHeaderType , localVarContentType , localVarBodyParameters , " " ) ; if ( apiClient -> response_code == 200 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 400 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 401 ) { printf ( " \n " , " " ) ; } if ( apiClient -> response_code == 403 ) { printf ( " \n " , " " ) ; } end : if ( apiClient -> dataReceived ) { free ( apiClient -> dataReceived ) ; apiClient -> dataReceived = NULL ; apiClient -> dataReceivedLen = 0 ; } list_freeList ( localVarQueryParameters ) ; list_freeList ( localVarHeaderParameters ) ; list_freeList ( localVarHeaderType ) ; list_freeList ( localVarContentType ) ; free ( localVarPath ) ; if ( keyHeader_Jenkins_Crumb ) { free ( keyHeader_Jenkins_Crumb ) ; keyHeader_Jenkins_Crumb = NULL ; } if ( valueHeader_Jenkins_Crumb ) { free ( valueHeader_Jenkins_Crumb ) ; valueHeader_Jenkins_Crumb = NULL ; } free ( keyPairHeader_Jenkins_Crumb ) ; if ( keyHeader_Content_Type ) { free ( keyHeader_Content_Type ) ; keyHeader_Content_Type = NULL ; } if ( valueHeader_Content_Type ) { free ( valueHeader_Content_Type ) ; valueHeader_Content_Type = NULL ; } free ( keyPairHeader_Content_Type ) ; if ( localVarSingleItemJSON_body ) { cJSON_Delete ( localVarSingleItemJSON_body ) ; localVarSingleItemJSON_body = NULL ; } free ( localVarBodyParameters ) ; if ( keyQuery_name ) { free ( keyQuery_name ) ; keyQuery_name = NULL ; } if ( valueQuery_name ) { free ( valueQuery_name ) ; valueQuery_name = NULL ; } if ( keyPairQuery_name ) { keyValuePair_free ( keyPairQuery_name ) ; keyPairQuery_name = NULL ; } if ( keyQuery_name ) { free ( keyQuery_name ) ; keyQuery_name = NULL ; } if ( keyPairQuery_name ) { keyValuePair_free ( keyPairQuery_name ) ; keyPairQuery_name = NULL ; } }
Create a new view using view configuration
Create a new view using view configuration
// create the path // header parameters // header parameters // query parameters // Body Param //string //produces //consumes //No return type