|
| 1 | +package com.langfuse.client; /** |
| 2 | + * This file was auto-generated by Fern from our API Definition. |
| 3 | + */ |
| 4 | + |
| 5 | +import com.langfuse.client.core.ClientOptions; |
| 6 | +import com.langfuse.client.core.Suppliers; |
| 7 | +import java.util.function.Supplier; |
| 8 | +import com.langfuse.client.resources.annotationqueues.AsyncAnnotationQueuesClient; |
| 9 | +import com.langfuse.client.resources.blobstorageintegrations.AsyncBlobStorageIntegrationsClient; |
| 10 | +import com.langfuse.client.resources.comments.AsyncCommentsClient; |
| 11 | +import com.langfuse.client.resources.datasetitems.AsyncDatasetItemsClient; |
| 12 | +import com.langfuse.client.resources.datasetrunitems.AsyncDatasetRunItemsClient; |
| 13 | +import com.langfuse.client.resources.datasets.AsyncDatasetsClient; |
| 14 | +import com.langfuse.client.resources.health.AsyncHealthClient; |
| 15 | +import com.langfuse.client.resources.ingestion.AsyncIngestionClient; |
| 16 | +import com.langfuse.client.resources.llmconnections.AsyncLlmConnectionsClient; |
| 17 | +import com.langfuse.client.resources.media.AsyncMediaClient; |
| 18 | +import com.langfuse.client.resources.metrics.AsyncMetricsClient; |
| 19 | +import com.langfuse.client.resources.metricsv2.AsyncMetricsV2Client; |
| 20 | +import com.langfuse.client.resources.models.AsyncModelsClient; |
| 21 | +import com.langfuse.client.resources.observations.AsyncObservationsClient; |
| 22 | +import com.langfuse.client.resources.observationsv2.AsyncObservationsV2Client; |
| 23 | +import com.langfuse.client.resources.opentelemetry.AsyncOpentelemetryClient; |
| 24 | +import com.langfuse.client.resources.organizations.AsyncOrganizationsClient; |
| 25 | +import com.langfuse.client.resources.projects.AsyncProjectsClient; |
| 26 | +import com.langfuse.client.resources.prompts.AsyncPromptsClient; |
| 27 | +import com.langfuse.client.resources.promptversion.AsyncPromptVersionClient; |
| 28 | +import com.langfuse.client.resources.scim.AsyncScimClient; |
| 29 | +import com.langfuse.client.resources.score.AsyncScoreClient; |
| 30 | +import com.langfuse.client.resources.scoreconfigs.AsyncScoreConfigsClient; |
| 31 | +import com.langfuse.client.resources.scorev2.AsyncScoreV2Client; |
| 32 | +import com.langfuse.client.resources.sessions.AsyncSessionsClient; |
| 33 | +import com.langfuse.client.resources.trace.AsyncTraceClient; |
| 34 | + |
| 35 | +public class AsyncLangfuseClient { |
| 36 | + protected final ClientOptions clientOptions; |
| 37 | + |
| 38 | + protected final Supplier<AsyncAnnotationQueuesClient> annotationQueuesClient; |
| 39 | + |
| 40 | + protected final Supplier<AsyncBlobStorageIntegrationsClient> blobStorageIntegrationsClient; |
| 41 | + |
| 42 | + protected final Supplier<AsyncCommentsClient> commentsClient; |
| 43 | + |
| 44 | + protected final Supplier<AsyncDatasetItemsClient> datasetItemsClient; |
| 45 | + |
| 46 | + protected final Supplier<AsyncDatasetRunItemsClient> datasetRunItemsClient; |
| 47 | + |
| 48 | + protected final Supplier<AsyncDatasetsClient> datasetsClient; |
| 49 | + |
| 50 | + protected final Supplier<AsyncHealthClient> healthClient; |
| 51 | + |
| 52 | + protected final Supplier<AsyncIngestionClient> ingestionClient; |
| 53 | + |
| 54 | + protected final Supplier<AsyncLlmConnectionsClient> llmConnectionsClient; |
| 55 | + |
| 56 | + protected final Supplier<AsyncMediaClient> mediaClient; |
| 57 | + |
| 58 | + protected final Supplier<AsyncMetricsV2Client> metricsV2Client; |
| 59 | + |
| 60 | + protected final Supplier<AsyncMetricsClient> metricsClient; |
| 61 | + |
| 62 | + protected final Supplier<AsyncModelsClient> modelsClient; |
| 63 | + |
| 64 | + protected final Supplier<AsyncObservationsV2Client> observationsV2Client; |
| 65 | + |
| 66 | + protected final Supplier<AsyncObservationsClient> observationsClient; |
| 67 | + |
| 68 | + protected final Supplier<AsyncOpentelemetryClient> opentelemetryClient; |
| 69 | + |
| 70 | + protected final Supplier<AsyncOrganizationsClient> organizationsClient; |
| 71 | + |
| 72 | + protected final Supplier<AsyncProjectsClient> projectsClient; |
| 73 | + |
| 74 | + protected final Supplier<AsyncPromptVersionClient> promptVersionClient; |
| 75 | + |
| 76 | + protected final Supplier<AsyncPromptsClient> promptsClient; |
| 77 | + |
| 78 | + protected final Supplier<AsyncScimClient> scimClient; |
| 79 | + |
| 80 | + protected final Supplier<AsyncScoreConfigsClient> scoreConfigsClient; |
| 81 | + |
| 82 | + protected final Supplier<AsyncScoreV2Client> scoreV2Client; |
| 83 | + |
| 84 | + protected final Supplier<AsyncScoreClient> scoreClient; |
| 85 | + |
| 86 | + protected final Supplier<AsyncSessionsClient> sessionsClient; |
| 87 | + |
| 88 | + protected final Supplier<AsyncTraceClient> traceClient; |
| 89 | + |
| 90 | + public AsyncLangfuseClient(ClientOptions clientOptions) { |
| 91 | + this.clientOptions = clientOptions; |
| 92 | + this.annotationQueuesClient = Suppliers.memoize(() -> new AsyncAnnotationQueuesClient(clientOptions)); |
| 93 | + this.blobStorageIntegrationsClient = Suppliers.memoize(() -> new AsyncBlobStorageIntegrationsClient(clientOptions)); |
| 94 | + this.commentsClient = Suppliers.memoize(() -> new AsyncCommentsClient(clientOptions)); |
| 95 | + this.datasetItemsClient = Suppliers.memoize(() -> new AsyncDatasetItemsClient(clientOptions)); |
| 96 | + this.datasetRunItemsClient = Suppliers.memoize(() -> new AsyncDatasetRunItemsClient(clientOptions)); |
| 97 | + this.datasetsClient = Suppliers.memoize(() -> new AsyncDatasetsClient(clientOptions)); |
| 98 | + this.healthClient = Suppliers.memoize(() -> new AsyncHealthClient(clientOptions)); |
| 99 | + this.ingestionClient = Suppliers.memoize(() -> new AsyncIngestionClient(clientOptions)); |
| 100 | + this.llmConnectionsClient = Suppliers.memoize(() -> new AsyncLlmConnectionsClient(clientOptions)); |
| 101 | + this.mediaClient = Suppliers.memoize(() -> new AsyncMediaClient(clientOptions)); |
| 102 | + this.metricsV2Client = Suppliers.memoize(() -> new AsyncMetricsV2Client(clientOptions)); |
| 103 | + this.metricsClient = Suppliers.memoize(() -> new AsyncMetricsClient(clientOptions)); |
| 104 | + this.modelsClient = Suppliers.memoize(() -> new AsyncModelsClient(clientOptions)); |
| 105 | + this.observationsV2Client = Suppliers.memoize(() -> new AsyncObservationsV2Client(clientOptions)); |
| 106 | + this.observationsClient = Suppliers.memoize(() -> new AsyncObservationsClient(clientOptions)); |
| 107 | + this.opentelemetryClient = Suppliers.memoize(() -> new AsyncOpentelemetryClient(clientOptions)); |
| 108 | + this.organizationsClient = Suppliers.memoize(() -> new AsyncOrganizationsClient(clientOptions)); |
| 109 | + this.projectsClient = Suppliers.memoize(() -> new AsyncProjectsClient(clientOptions)); |
| 110 | + this.promptVersionClient = Suppliers.memoize(() -> new AsyncPromptVersionClient(clientOptions)); |
| 111 | + this.promptsClient = Suppliers.memoize(() -> new AsyncPromptsClient(clientOptions)); |
| 112 | + this.scimClient = Suppliers.memoize(() -> new AsyncScimClient(clientOptions)); |
| 113 | + this.scoreConfigsClient = Suppliers.memoize(() -> new AsyncScoreConfigsClient(clientOptions)); |
| 114 | + this.scoreV2Client = Suppliers.memoize(() -> new AsyncScoreV2Client(clientOptions)); |
| 115 | + this.scoreClient = Suppliers.memoize(() -> new AsyncScoreClient(clientOptions)); |
| 116 | + this.sessionsClient = Suppliers.memoize(() -> new AsyncSessionsClient(clientOptions)); |
| 117 | + this.traceClient = Suppliers.memoize(() -> new AsyncTraceClient(clientOptions)); |
| 118 | + } |
| 119 | + |
| 120 | + public AsyncAnnotationQueuesClient annotationQueues() { |
| 121 | + return this.annotationQueuesClient.get(); |
| 122 | + } |
| 123 | + |
| 124 | + public AsyncBlobStorageIntegrationsClient blobStorageIntegrations() { |
| 125 | + return this.blobStorageIntegrationsClient.get(); |
| 126 | + } |
| 127 | + |
| 128 | + public AsyncCommentsClient comments() { |
| 129 | + return this.commentsClient.get(); |
| 130 | + } |
| 131 | + |
| 132 | + public AsyncDatasetItemsClient datasetItems() { |
| 133 | + return this.datasetItemsClient.get(); |
| 134 | + } |
| 135 | + |
| 136 | + public AsyncDatasetRunItemsClient datasetRunItems() { |
| 137 | + return this.datasetRunItemsClient.get(); |
| 138 | + } |
| 139 | + |
| 140 | + public AsyncDatasetsClient datasets() { |
| 141 | + return this.datasetsClient.get(); |
| 142 | + } |
| 143 | + |
| 144 | + public AsyncHealthClient health() { |
| 145 | + return this.healthClient.get(); |
| 146 | + } |
| 147 | + |
| 148 | + public AsyncIngestionClient ingestion() { |
| 149 | + return this.ingestionClient.get(); |
| 150 | + } |
| 151 | + |
| 152 | + public AsyncLlmConnectionsClient llmConnections() { |
| 153 | + return this.llmConnectionsClient.get(); |
| 154 | + } |
| 155 | + |
| 156 | + public AsyncMediaClient media() { |
| 157 | + return this.mediaClient.get(); |
| 158 | + } |
| 159 | + |
| 160 | + public AsyncMetricsV2Client metricsV2() { |
| 161 | + return this.metricsV2Client.get(); |
| 162 | + } |
| 163 | + |
| 164 | + public AsyncMetricsClient metrics() { |
| 165 | + return this.metricsClient.get(); |
| 166 | + } |
| 167 | + |
| 168 | + public AsyncModelsClient models() { |
| 169 | + return this.modelsClient.get(); |
| 170 | + } |
| 171 | + |
| 172 | + public AsyncObservationsV2Client observationsV2() { |
| 173 | + return this.observationsV2Client.get(); |
| 174 | + } |
| 175 | + |
| 176 | + public AsyncObservationsClient observations() { |
| 177 | + return this.observationsClient.get(); |
| 178 | + } |
| 179 | + |
| 180 | + public AsyncOpentelemetryClient opentelemetry() { |
| 181 | + return this.opentelemetryClient.get(); |
| 182 | + } |
| 183 | + |
| 184 | + public AsyncOrganizationsClient organizations() { |
| 185 | + return this.organizationsClient.get(); |
| 186 | + } |
| 187 | + |
| 188 | + public AsyncProjectsClient projects() { |
| 189 | + return this.projectsClient.get(); |
| 190 | + } |
| 191 | + |
| 192 | + public AsyncPromptVersionClient promptVersion() { |
| 193 | + return this.promptVersionClient.get(); |
| 194 | + } |
| 195 | + |
| 196 | + public AsyncPromptsClient prompts() { |
| 197 | + return this.promptsClient.get(); |
| 198 | + } |
| 199 | + |
| 200 | + public AsyncScimClient scim() { |
| 201 | + return this.scimClient.get(); |
| 202 | + } |
| 203 | + |
| 204 | + public AsyncScoreConfigsClient scoreConfigs() { |
| 205 | + return this.scoreConfigsClient.get(); |
| 206 | + } |
| 207 | + |
| 208 | + public AsyncScoreV2Client scoreV2() { |
| 209 | + return this.scoreV2Client.get(); |
| 210 | + } |
| 211 | + |
| 212 | + public AsyncScoreClient score() { |
| 213 | + return this.scoreClient.get(); |
| 214 | + } |
| 215 | + |
| 216 | + public AsyncSessionsClient sessions() { |
| 217 | + return this.sessionsClient.get(); |
| 218 | + } |
| 219 | + |
| 220 | + public AsyncTraceClient trace() { |
| 221 | + return this.traceClient.get(); |
| 222 | + } |
| 223 | + |
| 224 | + public static AsyncLangfuseClientBuilder builder() { |
| 225 | + return new AsyncLangfuseClientBuilder(); |
| 226 | + } |
| 227 | +} |
0 commit comments