/// <summary> /// Create a new relation /// </summary> /// <param name="ID">Unique ID</param> /// <param name="body">Message-Body</param> /// <returns></returns> public ServiceHasProcess createServiceHasProcess(string ID, Process body) { // create path and map variables var path = "/processes/{ID}/serviceHasProcesses".Replace("{format}","json").Replace("{" + "ID" + "}", apiClient.escapeString(ID.ToString())); // query params var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(); // verify required params are set if (ID == null ) { throw new ApiException(400, "missing required params"); } string paramStr = null; try { var response = apiClient.invokeAPI(path, "POST", queryParams, body, headerParams); if(response != null){ return (ServiceHasProcess) ApiClient.deserialize(response, typeof(ServiceHasProcess)); } else { return null; } } catch (ApiException ex) { if(ex.ErrorCode == 404) { return null; } else { throw ex; } } }
/// <summary> /// Create a new Process /// </summary> /// <param name="body">Message-Body</param> /// <returns></returns> public Process createProcess(Process body) { // create path and map variables var path = "/processes".Replace("{format}","json"); // query params var queryParams = new Dictionary<String, String>(); var headerParams = new Dictionary<String, String>(); string paramStr = null; try { var response = apiClient.invokeAPI(path, "POST", queryParams, body, headerParams); if(response != null){ return (Process) ApiClient.deserialize(response, typeof(Process)); } else { return null; } } catch (ApiException ex) { if(ex.ErrorCode == 404) { return null; } else { throw ex; } } }