ru.testit.kotlin.client.apis.ProjectTestPlansApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of testit-api-client-kotlin Show documentation
Show all versions of testit-api-client-kotlin Show documentation
Kotlin API client for TestIT.
/**
*
* Please note:
* This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* Do not edit this file manually.
*
*/
@file:Suppress(
"ArrayInDataClass",
"EnumEntryName",
"RemoveRedundantQualifierName",
"UnusedImport"
)
package ru.testit.kotlin.client.apis
import java.io.IOException
import okhttp3.OkHttpClient
import okhttp3.HttpUrl
import ru.testit.kotlin.client.models.ProblemDetails
import ru.testit.kotlin.client.models.ProjectTestPlansFilterModel
import ru.testit.kotlin.client.models.TestPlanSelectModel
import ru.testit.kotlin.client.models.TestPlanWithAnalyticModel
import ru.testit.kotlin.client.models.ValidationProblemDetails
import com.squareup.moshi.Json
import ru.testit.kotlin.client.infrastructure.ApiClient
import ru.testit.kotlin.client.infrastructure.ApiResponse
import ru.testit.kotlin.client.infrastructure.ClientException
import ru.testit.kotlin.client.infrastructure.ClientError
import ru.testit.kotlin.client.infrastructure.ServerException
import ru.testit.kotlin.client.infrastructure.ServerError
import ru.testit.kotlin.client.infrastructure.MultiValueMap
import ru.testit.kotlin.client.infrastructure.PartConfig
import ru.testit.kotlin.client.infrastructure.RequestConfig
import ru.testit.kotlin.client.infrastructure.RequestMethod
import ru.testit.kotlin.client.infrastructure.ResponseType
import ru.testit.kotlin.client.infrastructure.Success
import ru.testit.kotlin.client.infrastructure.toMultiValue
class ProjectTestPlansApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient = ApiClient.defaultClient) : ApiClient(basePath, client) {
companion object {
@JvmStatic
val defaultBasePath: String by lazy {
System.getProperties().getProperty(ApiClient.baseUrlKey, "http://localhost")
}
}
/**
* Get TestPlans analytics
* Use case User sets project internal identifier User sets query params User runs method execution System return analytics
* @param projectId Project internal (UUID) identifier
* @param isDeleted (optional)
* @param mustUpdateCache (optional, default to false)
* @param skip Amount of items to be skipped (offset) (optional)
* @param take Amount of items to be taken (limit) (optional)
* @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional)
* @param searchField Property name for searching (optional)
* @param searchValue Value for searching (optional)
* @return kotlin.collections.List
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun apiV2ProjectsProjectIdTestPlansAnalyticsGet(projectId: java.util.UUID, isDeleted: kotlin.Boolean? = null, mustUpdateCache: kotlin.Boolean? = false, skip: kotlin.Int? = null, take: kotlin.Int? = null, orderBy: kotlin.String? = null, searchField: kotlin.String? = null, searchValue: kotlin.String? = null) : kotlin.collections.List {
val localVarResponse = apiV2ProjectsProjectIdTestPlansAnalyticsGetWithHttpInfo(projectId = projectId, isDeleted = isDeleted, mustUpdateCache = mustUpdateCache, skip = skip, take = take, orderBy = orderBy, searchField = searchField, searchValue = searchValue)
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
}
}
}
/**
* Get TestPlans analytics
* Use case User sets project internal identifier User sets query params User runs method execution System return analytics
* @param projectId Project internal (UUID) identifier
* @param isDeleted (optional)
* @param mustUpdateCache (optional, default to false)
* @param skip Amount of items to be skipped (offset) (optional)
* @param take Amount of items to be taken (limit) (optional)
* @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional)
* @param searchField Property name for searching (optional)
* @param searchValue Value for searching (optional)
* @return ApiResponse?>
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class)
fun apiV2ProjectsProjectIdTestPlansAnalyticsGetWithHttpInfo(projectId: java.util.UUID, isDeleted: kotlin.Boolean?, mustUpdateCache: kotlin.Boolean?, skip: kotlin.Int?, take: kotlin.Int?, orderBy: kotlin.String?, searchField: kotlin.String?, searchValue: kotlin.String?) : ApiResponse?> {
val localVariableConfig = apiV2ProjectsProjectIdTestPlansAnalyticsGetRequestConfig(projectId = projectId, isDeleted = isDeleted, mustUpdateCache = mustUpdateCache, skip = skip, take = take, orderBy = orderBy, searchField = searchField, searchValue = searchValue)
return request>(
localVariableConfig
)
}
/**
* To obtain the request config of the operation apiV2ProjectsProjectIdTestPlansAnalyticsGet
*
* @param projectId Project internal (UUID) identifier
* @param isDeleted (optional)
* @param mustUpdateCache (optional, default to false)
* @param skip Amount of items to be skipped (offset) (optional)
* @param take Amount of items to be taken (limit) (optional)
* @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional)
* @param searchField Property name for searching (optional)
* @param searchValue Value for searching (optional)
* @return RequestConfig
*/
fun apiV2ProjectsProjectIdTestPlansAnalyticsGetRequestConfig(projectId: java.util.UUID, isDeleted: kotlin.Boolean?, mustUpdateCache: kotlin.Boolean?, skip: kotlin.Int?, take: kotlin.Int?, orderBy: kotlin.String?, searchField: kotlin.String?, searchValue: kotlin.String?) : RequestConfig {
val localVariableBody = null
val localVariableQuery: MultiValueMap = mutableMapOf>()
.apply {
if (isDeleted != null) {
put("isDeleted", listOf(isDeleted.toString()))
}
if (mustUpdateCache != null) {
put("mustUpdateCache", listOf(mustUpdateCache.toString()))
}
if (skip != null) {
put("Skip", listOf(skip.toString()))
}
if (take != null) {
put("Take", listOf(take.toString()))
}
if (orderBy != null) {
put("OrderBy", listOf(orderBy.toString()))
}
if (searchField != null) {
put("SearchField", listOf(searchField.toString()))
}
if (searchValue != null) {
put("SearchValue", listOf(searchValue.toString()))
}
}
val localVariableHeaders: MutableMap = mutableMapOf()
localVariableHeaders["Accept"] = "application/json"
return RequestConfig(
method = RequestMethod.GET,
path = "/api/v2/projects/{projectId}/testPlans/analytics".replace("{"+"projectId"+"}", encodeURIComponent(projectId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
/**
* Delete multiple test plans
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return kotlin.collections.List
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun apiV2ProjectsProjectIdTestPlansDeleteBulkPost(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel? = null) : kotlin.collections.List {
val localVarResponse = apiV2ProjectsProjectIdTestPlansDeleteBulkPostWithHttpInfo(projectId = projectId, testPlanSelectModel = testPlanSelectModel)
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
}
}
}
/**
* Delete multiple test plans
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return ApiResponse?>
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class)
fun apiV2ProjectsProjectIdTestPlansDeleteBulkPostWithHttpInfo(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel?) : ApiResponse?> {
val localVariableConfig = apiV2ProjectsProjectIdTestPlansDeleteBulkPostRequestConfig(projectId = projectId, testPlanSelectModel = testPlanSelectModel)
return request>(
localVariableConfig
)
}
/**
* To obtain the request config of the operation apiV2ProjectsProjectIdTestPlansDeleteBulkPost
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return RequestConfig
*/
fun apiV2ProjectsProjectIdTestPlansDeleteBulkPostRequestConfig(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel?) : RequestConfig {
val localVariableBody = testPlanSelectModel
val localVariableQuery: MultiValueMap = mutableMapOf()
val localVariableHeaders: MutableMap = mutableMapOf()
localVariableHeaders["Content-Type"] = "application/json"
localVariableHeaders["Accept"] = "application/json"
return RequestConfig(
method = RequestMethod.POST,
path = "/api/v2/projects/{projectId}/testPlans/delete/bulk".replace("{"+"projectId"+"}", encodeURIComponent(projectId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
/**
* Checks if TestPlan exists with the specified name exists for the project
* Use case User sets project internal or global identifier User runs method execution System purge delete project workitems
* @param projectId Project internal (UUID) or global (integer) identifier
* @param name TestPlan name to check
* @return kotlin.Boolean
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun apiV2ProjectsProjectIdTestPlansNameExistsGet(projectId: java.util.UUID, name: kotlin.String) : kotlin.Boolean {
val localVarResponse = apiV2ProjectsProjectIdTestPlansNameExistsGetWithHttpInfo(projectId = projectId, name = name)
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.Boolean
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
}
}
}
/**
* Checks if TestPlan exists with the specified name exists for the project
* Use case User sets project internal or global identifier User runs method execution System purge delete project workitems
* @param projectId Project internal (UUID) or global (integer) identifier
* @param name TestPlan name to check
* @return ApiResponse
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class)
fun apiV2ProjectsProjectIdTestPlansNameExistsGetWithHttpInfo(projectId: java.util.UUID, name: kotlin.String) : ApiResponse {
val localVariableConfig = apiV2ProjectsProjectIdTestPlansNameExistsGetRequestConfig(projectId = projectId, name = name)
return request(
localVariableConfig
)
}
/**
* To obtain the request config of the operation apiV2ProjectsProjectIdTestPlansNameExistsGet
*
* @param projectId Project internal (UUID) or global (integer) identifier
* @param name TestPlan name to check
* @return RequestConfig
*/
fun apiV2ProjectsProjectIdTestPlansNameExistsGetRequestConfig(projectId: java.util.UUID, name: kotlin.String) : RequestConfig {
val localVariableBody = null
val localVariableQuery: MultiValueMap = mutableMapOf()
val localVariableHeaders: MutableMap = mutableMapOf()
localVariableHeaders["Accept"] = "application/json"
return RequestConfig(
method = RequestMethod.GET,
path = "/api/v2/projects/{projectId}/testPlans/{name}/exists".replace("{"+"projectId"+"}", encodeURIComponent(projectId.toString())).replace("{"+"name"+"}", encodeURIComponent(name.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
/**
* Permanently delete multiple archived test plans
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return void
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun apiV2ProjectsProjectIdTestPlansPurgeBulkPost(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel? = null) : Unit {
val localVarResponse = apiV2ProjectsProjectIdTestPlansPurgeBulkPostWithHttpInfo(projectId = projectId, testPlanSelectModel = testPlanSelectModel)
return when (localVarResponse.responseType) {
ResponseType.Success -> Unit
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
}
}
}
/**
* Permanently delete multiple archived test plans
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return ApiResponse
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Throws(IllegalStateException::class, IOException::class)
fun apiV2ProjectsProjectIdTestPlansPurgeBulkPostWithHttpInfo(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel?) : ApiResponse {
val localVariableConfig = apiV2ProjectsProjectIdTestPlansPurgeBulkPostRequestConfig(projectId = projectId, testPlanSelectModel = testPlanSelectModel)
return request(
localVariableConfig
)
}
/**
* To obtain the request config of the operation apiV2ProjectsProjectIdTestPlansPurgeBulkPost
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return RequestConfig
*/
fun apiV2ProjectsProjectIdTestPlansPurgeBulkPostRequestConfig(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel?) : RequestConfig {
val localVariableBody = testPlanSelectModel
val localVariableQuery: MultiValueMap = mutableMapOf()
val localVariableHeaders: MutableMap = mutableMapOf()
localVariableHeaders["Content-Type"] = "application/json"
localVariableHeaders["Accept"] = "application/json"
return RequestConfig(
method = RequestMethod.POST,
path = "/api/v2/projects/{projectId}/testPlans/purge/bulk".replace("{"+"projectId"+"}", encodeURIComponent(projectId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
/**
* Restore multiple test plans
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return kotlin.collections.List
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun apiV2ProjectsProjectIdTestPlansRestoreBulkPost(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel? = null) : kotlin.collections.List {
val localVarResponse = apiV2ProjectsProjectIdTestPlansRestoreBulkPostWithHttpInfo(projectId = projectId, testPlanSelectModel = testPlanSelectModel)
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
}
}
}
/**
* Restore multiple test plans
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return ApiResponse?>
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class)
fun apiV2ProjectsProjectIdTestPlansRestoreBulkPostWithHttpInfo(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel?) : ApiResponse?> {
val localVariableConfig = apiV2ProjectsProjectIdTestPlansRestoreBulkPostRequestConfig(projectId = projectId, testPlanSelectModel = testPlanSelectModel)
return request>(
localVariableConfig
)
}
/**
* To obtain the request config of the operation apiV2ProjectsProjectIdTestPlansRestoreBulkPost
*
* @param projectId Unique or global ID of the project
* @param testPlanSelectModel (optional)
* @return RequestConfig
*/
fun apiV2ProjectsProjectIdTestPlansRestoreBulkPostRequestConfig(projectId: kotlin.String, testPlanSelectModel: TestPlanSelectModel?) : RequestConfig {
val localVariableBody = testPlanSelectModel
val localVariableQuery: MultiValueMap = mutableMapOf()
val localVariableHeaders: MutableMap = mutableMapOf()
localVariableHeaders["Content-Type"] = "application/json"
localVariableHeaders["Accept"] = "application/json"
return RequestConfig(
method = RequestMethod.POST,
path = "/api/v2/projects/{projectId}/testPlans/restore/bulk".replace("{"+"projectId"+"}", encodeURIComponent(projectId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
/**
* Get Project TestPlans with analytics
* Use case User sets project internal or global identifier User sets request body User runs method execution System returns project testplans with analytics
* @param projectId Project internal (UUID) or global (integer) identifier
* @param mustUpdateCache (optional, default to false)
* @param skip Amount of items to be skipped (offset) (optional)
* @param take Amount of items to be taken (limit) (optional)
* @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional)
* @param searchField Property name for searching (optional)
* @param searchValue Value for searching (optional)
* @param projectTestPlansFilterModel (optional)
* @return kotlin.collections.List
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class, UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun apiV2ProjectsProjectIdTestPlansSearchPost(projectId: kotlin.String, mustUpdateCache: kotlin.Boolean? = false, skip: kotlin.Int? = null, take: kotlin.Int? = null, orderBy: kotlin.String? = null, searchField: kotlin.String? = null, searchValue: kotlin.String? = null, projectTestPlansFilterModel: ProjectTestPlansFilterModel? = null) : kotlin.collections.List {
val localVarResponse = apiV2ProjectsProjectIdTestPlansSearchPostWithHttpInfo(projectId = projectId, mustUpdateCache = mustUpdateCache, skip = skip, take = take, orderBy = orderBy, searchField = searchField, searchValue = searchValue, projectTestPlansFilterModel = projectTestPlansFilterModel)
return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as kotlin.collections.List
ResponseType.Informational -> throw UnsupportedOperationException("Client does not support Informational responses.")
ResponseType.Redirection -> throw UnsupportedOperationException("Client does not support Redirection responses.")
ResponseType.ClientError -> {
val localVarError = localVarResponse as ClientError<*>
throw ClientException("Client error : ${localVarError.statusCode} ${localVarError.message.orEmpty()}", localVarError.statusCode, localVarResponse)
}
ResponseType.ServerError -> {
val localVarError = localVarResponse as ServerError<*>
throw ServerException("Server error : ${localVarError.statusCode} ${localVarError.message.orEmpty()} ${localVarError.body}", localVarError.statusCode, localVarResponse)
}
}
}
/**
* Get Project TestPlans with analytics
* Use case User sets project internal or global identifier User sets request body User runs method execution System returns project testplans with analytics
* @param projectId Project internal (UUID) or global (integer) identifier
* @param mustUpdateCache (optional, default to false)
* @param skip Amount of items to be skipped (offset) (optional)
* @param take Amount of items to be taken (limit) (optional)
* @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional)
* @param searchField Property name for searching (optional)
* @param searchValue Value for searching (optional)
* @param projectTestPlansFilterModel (optional)
* @return ApiResponse?>
* @throws IllegalStateException If the request is not correctly configured
* @throws IOException Rethrows the OkHttp execute method exception
*/
@Suppress("UNCHECKED_CAST")
@Throws(IllegalStateException::class, IOException::class)
fun apiV2ProjectsProjectIdTestPlansSearchPostWithHttpInfo(projectId: kotlin.String, mustUpdateCache: kotlin.Boolean?, skip: kotlin.Int?, take: kotlin.Int?, orderBy: kotlin.String?, searchField: kotlin.String?, searchValue: kotlin.String?, projectTestPlansFilterModel: ProjectTestPlansFilterModel?) : ApiResponse?> {
val localVariableConfig = apiV2ProjectsProjectIdTestPlansSearchPostRequestConfig(projectId = projectId, mustUpdateCache = mustUpdateCache, skip = skip, take = take, orderBy = orderBy, searchField = searchField, searchValue = searchValue, projectTestPlansFilterModel = projectTestPlansFilterModel)
return request>(
localVariableConfig
)
}
/**
* To obtain the request config of the operation apiV2ProjectsProjectIdTestPlansSearchPost
*
* @param projectId Project internal (UUID) or global (integer) identifier
* @param mustUpdateCache (optional, default to false)
* @param skip Amount of items to be skipped (offset) (optional)
* @param take Amount of items to be taken (limit) (optional)
* @param orderBy SQL-like ORDER BY statement (column1 ASC|DESC , column2 ASC|DESC) (optional)
* @param searchField Property name for searching (optional)
* @param searchValue Value for searching (optional)
* @param projectTestPlansFilterModel (optional)
* @return RequestConfig
*/
fun apiV2ProjectsProjectIdTestPlansSearchPostRequestConfig(projectId: kotlin.String, mustUpdateCache: kotlin.Boolean?, skip: kotlin.Int?, take: kotlin.Int?, orderBy: kotlin.String?, searchField: kotlin.String?, searchValue: kotlin.String?, projectTestPlansFilterModel: ProjectTestPlansFilterModel?) : RequestConfig {
val localVariableBody = projectTestPlansFilterModel
val localVariableQuery: MultiValueMap = mutableMapOf>()
.apply {
if (mustUpdateCache != null) {
put("mustUpdateCache", listOf(mustUpdateCache.toString()))
}
if (skip != null) {
put("Skip", listOf(skip.toString()))
}
if (take != null) {
put("Take", listOf(take.toString()))
}
if (orderBy != null) {
put("OrderBy", listOf(orderBy.toString()))
}
if (searchField != null) {
put("SearchField", listOf(searchField.toString()))
}
if (searchValue != null) {
put("SearchValue", listOf(searchValue.toString()))
}
}
val localVariableHeaders: MutableMap = mutableMapOf()
localVariableHeaders["Content-Type"] = "application/json"
localVariableHeaders["Accept"] = "application/json"
return RequestConfig(
method = RequestMethod.POST,
path = "/api/v2/projects/{projectId}/testPlans/search".replace("{"+"projectId"+"}", encodeURIComponent(projectId.toString())),
query = localVariableQuery,
headers = localVariableHeaders,
requiresAuthentication = true,
body = localVariableBody
)
}
private fun encodeURIComponent(uriComponent: kotlin.String): kotlin.String =
HttpUrl.Builder().scheme("http").host("localhost").addPathSegment(uriComponent).build().encodedPathSegments[0]
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy