Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.gradle
.idea
build
codegen.log
Original file line number Diff line number Diff line change
Expand Up @@ -202,36 +202,6 @@ constructor(
}
}

private val listAttemptsHandler: Handler<EventSubscriptionListAttemptsPageAsync.Response> =
jsonHandler<EventSubscriptionListAttemptsPageAsync.Response>(clientOptions.jsonMapper)
.withErrorHandler(errorHandler)

/** List all the message attempts for a given event subscription. */
override fun listAttempts(
params: EventSubscriptionListAttemptsParams,
requestOptions: RequestOptions
): CompletableFuture<EventSubscriptionListAttemptsPageAsync> {
val request =
HttpRequest.builder()
.method(HttpMethod.GET)
.addPathSegments("event_subscriptions", params.getPathParam(0), "attempts")
.putAllQueryParams(params.getQueryParams())
.putAllHeaders(clientOptions.headers)
.putAllHeaders(params.getHeaders())
.build()
return clientOptions.httpClient.executeAsync(request, requestOptions).thenApply { response
->
response
.let { listAttemptsHandler.handle(it) }
.apply {
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
validate()
}
}
.let { EventSubscriptionListAttemptsPageAsync.of(this, params, it) }
}
}

private val recoverHandler: Handler<Void?> = emptyHandler().withErrorHandler(errorHandler)

/** Resend all failed messages since a given time. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,35 +192,6 @@ constructor(
}
}

private val listAttemptsHandler: Handler<EventSubscriptionListAttemptsPage.Response> =
jsonHandler<EventSubscriptionListAttemptsPage.Response>(clientOptions.jsonMapper)
.withErrorHandler(errorHandler)

/** List all the message attempts for a given event subscription. */
override fun listAttempts(
params: EventSubscriptionListAttemptsParams,
requestOptions: RequestOptions
): EventSubscriptionListAttemptsPage {
val request =
HttpRequest.builder()
.method(HttpMethod.GET)
.addPathSegments("event_subscriptions", params.getPathParam(0), "attempts")
.putAllQueryParams(params.getQueryParams())
.putAllHeaders(clientOptions.headers)
.putAllHeaders(params.getHeaders())
.build()
return clientOptions.httpClient.execute(request, requestOptions).let { response ->
response
.let { listAttemptsHandler.handle(it) }
.apply {
if (requestOptions.responseValidation ?: clientOptions.responseValidation) {
validate()
}
}
.let { EventSubscriptionListAttemptsPage.of(this, params, it) }
}
}

private val recoverHandler: Handler<Void?> = emptyHandler().withErrorHandler(errorHandler)

/** Resend all failed messages since a given time. */
Expand Down