/// <summary> /// This call returns the possibile values for a process variable in format list or table. /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="processVariableId">Process variable identifier</param> /// <param name="processVariables">Actual values of the process variables (for value dependant query)</param> /// <returns>Task of FieldValuesDTO</returns> public async System.Threading.Tasks.Task <FieldValuesDTO> ProcessVariablesGetFieldValuesByProcessVariableAsync(int?processVariableId, VariablesValuesCriteriaDTO processVariables) { ApiResponse <FieldValuesDTO> localVarResponse = await ProcessVariablesGetFieldValuesByProcessVariableAsyncWithHttpInfo(processVariableId, processVariables); return(localVarResponse.Data); }
/// <summary> /// This call returns the possibile values for a process variable in format list or table. /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="processVariableId">Process variable identifier</param> /// <param name="processVariables">Actual values of the process variables (for value dependant query)</param> /// <returns>Task of ApiResponse (FieldValuesDTO)</returns> public async System.Threading.Tasks.Task <ApiResponse <FieldValuesDTO> > ProcessVariablesGetFieldValuesByProcessVariableAsyncWithHttpInfo(int?processVariableId, VariablesValuesCriteriaDTO processVariables) { // verify the required parameter 'processVariableId' is set if (processVariableId == null) { throw new ApiException(400, "Missing required parameter 'processVariableId' when calling ProcessVariablesApi->ProcessVariablesGetFieldValuesByProcessVariable"); } // verify the required parameter 'processVariables' is set if (processVariables == null) { throw new ApiException(400, "Missing required parameter 'processVariables' when calling ProcessVariablesApi->ProcessVariablesGetFieldValuesByProcessVariable"); } var localVarPath = "/api/ProcessVariables/{processVariableId}/getDatasourceValues"; var localVarPathParams = new Dictionary <String, String>(); var localVarQueryParams = new List <KeyValuePair <String, String> >(); var localVarHeaderParams = new Dictionary <String, String>(Configuration.DefaultHeader); var localVarFormParams = new Dictionary <String, String>(); var localVarFileParams = new Dictionary <String, FileParameter>(); Object localVarPostBody = null; // to determine the Content-Type header String[] localVarHttpContentTypes = new String[] { "application/json", "text/json", "application/xml", "text/xml", "application/x-www-form-urlencoded" }; String localVarHttpContentType = Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); // to determine the Accept header String[] localVarHttpHeaderAccepts = new String[] { "application/json", "text/json", "application/xml", "text/xml" }; String localVarHttpHeaderAccept = Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); if (localVarHttpHeaderAccept != null) { localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); } if (processVariableId != null) { localVarPathParams.Add("processVariableId", Configuration.ApiClient.ParameterToString(processVariableId)); // path parameter } if (processVariables != null && processVariables.GetType() != typeof(byte[])) { localVarPostBody = Configuration.ApiClient.Serialize(processVariables); // http body (model) parameter } else { localVarPostBody = processVariables; // byte array } // authentication (Authorization) required if (!String.IsNullOrEmpty(Configuration.GetApiKeyWithPrefix("Authorization"))) { localVarHeaderParams["Authorization"] = Configuration.GetApiKeyWithPrefix("Authorization"); } // make the HTTP request IRestResponse localVarResponse = (IRestResponse)await Configuration.ApiClient.CallApiAsync(localVarPath, Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, localVarPathParams, localVarHttpContentType); int localVarStatusCode = (int)localVarResponse.StatusCode; if (ExceptionFactory != null) { Exception exception = ExceptionFactory("ProcessVariablesGetFieldValuesByProcessVariable", localVarResponse); if (exception != null) { throw exception; } } return(new ApiResponse <FieldValuesDTO>(localVarStatusCode, localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), (FieldValuesDTO)Configuration.ApiClient.Deserialize(localVarResponse, typeof(FieldValuesDTO)))); }
/// <summary> /// This call returns the possibile values for a process variable in format list or table. /// </summary> /// <exception cref="IO.Swagger.Client.ApiException">Thrown when fails to make API call</exception> /// <param name="processVariableId">Process variable identifier</param> /// <param name="processVariables">Actual values of the process variables (for value dependant query)</param> /// <returns>FieldValuesDTO</returns> public FieldValuesDTO ProcessVariablesGetFieldValuesByProcessVariable(int?processVariableId, VariablesValuesCriteriaDTO processVariables) { ApiResponse <FieldValuesDTO> localVarResponse = ProcessVariablesGetFieldValuesByProcessVariableWithHttpInfo(processVariableId, processVariables); return(localVarResponse.Data); }