All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.camunda.tasklist.generated.api.VariablesApi Maven / Gradle / Ivy

The newest version!
/*
 * Tasklist REST API
 * Tasklist is a ready-to-use API application to rapidly implement business processes alongside user tasks in Zeebe.
 *
 * The version of the OpenAPI document: v1
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */

package io.camunda.tasklist.generated.api;

import com.fasterxml.jackson.core.type.TypeReference;

import io.camunda.tasklist.generated.invoker.ApiException;
import io.camunda.tasklist.generated.invoker.ApiClient;
import io.camunda.tasklist.generated.invoker.BaseApi;
import io.camunda.tasklist.generated.invoker.Configuration;
import io.camunda.tasklist.generated.invoker.Pair;

import io.camunda.tasklist.generated.model.Error;
import io.camunda.tasklist.generated.model.VariableResponse;


import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;

@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2024-12-10T08:38:14.250454645Z[Etc/UTC]", comments = "Generator version: 7.8.0")
public class VariablesApi extends BaseApi {

  public VariablesApi() {
    super(Configuration.getDefaultApiClient());
  }

  public VariablesApi(ApiClient apiClient) {
    super(apiClient);
  }

  /**
   * Get a variable
   * Get the variable details by variable id.
   * @param variableId The ID of the variable. (required)
   * @return VariableResponse
   * @throws ApiException if fails to make API call
   */
  public VariableResponse getVariableById(String variableId) throws ApiException {
    return this.getVariableById(variableId, Collections.emptyMap());
  }


  /**
   * Get a variable
   * Get the variable details by variable id.
   * @param variableId The ID of the variable. (required)
   * @param additionalHeaders additionalHeaders for this call
   * @return VariableResponse
   * @throws ApiException if fails to make API call
   */
  public VariableResponse getVariableById(String variableId, Map additionalHeaders) throws ApiException {
    Object localVarPostBody = null;
    
    // verify the required parameter 'variableId' is set
    if (variableId == null) {
      throw new ApiException(400, "Missing the required parameter 'variableId' when calling getVariableById");
    }
    
    // create path and map variables
    String localVarPath = "/v1/variables/{variableId}"
      .replaceAll("\\{" + "variableId" + "\\}", apiClient.escapeString(variableId.toString()));

    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    String localVarQueryParameterBaseName;
    List localVarQueryParams = new ArrayList();
    List localVarCollectionQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarCookieParams = new HashMap();
    Map localVarFormParams = new HashMap();

    
    localVarHeaderParams.putAll(additionalHeaders);

    
    
    final String[] localVarAccepts = {
      "application/json", "application/problem+json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] { "cookie", "bearer-key" };

    TypeReference localVarReturnType = new TypeReference() {};
    return apiClient.invokeAPI(
        localVarPath,
        "GET",
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarQueryStringJoiner.toString(),
        localVarPostBody,
        localVarHeaderParams,
        localVarCookieParams,
        localVarFormParams,
        localVarAccept,
        localVarContentType,
        localVarAuthNames,
        localVarReturnType
    );
  }

  @Override
  public  T invokeAPI(String url, String method, Object request, TypeReference returnType, Map additionalHeaders) throws ApiException {
    String localVarPath = url.replace(apiClient.getBaseURL(), "");
    StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
    List localVarQueryParams = new ArrayList();
    List localVarCollectionQueryParams = new ArrayList();
    Map localVarHeaderParams = new HashMap();
    Map localVarCookieParams = new HashMap();
    Map localVarFormParams = new HashMap();

    localVarHeaderParams.putAll(additionalHeaders);

    final String[] localVarAccepts = {
      "application/json", "application/problem+json"
    };
    final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);

    final String[] localVarContentTypes = {
      
    };
    final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);

    String[] localVarAuthNames = new String[] { "cookie", "bearer-key" };

    return apiClient.invokeAPI(
      localVarPath,
        method,
        localVarQueryParams,
        localVarCollectionQueryParams,
        localVarQueryStringJoiner.toString(),
        request,
        localVarHeaderParams,
        localVarCookieParams,
        localVarFormParams,
        localVarAccept,
        localVarContentType,
        localVarAuthNames,
        returnType
    );
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy