Skip to content

Commit

Permalink
feat(api): update via SDK Studio (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
stainless-app[bot] authored and stainless-bot committed May 6, 2024
1 parent cc185e8 commit 23923fc
Show file tree
Hide file tree
Showing 29 changed files with 146 additions and 31,183 deletions.
2 changes: 1 addition & 1 deletion .stats.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
configured_endpoints: 57
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/manugoyal%2Fbraintrust-sdk-kotlin-44b51ad3239a0d86e832a267339339cc1727c967a62b4ac9a419eeba7085a62c.yml
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/manugoyal%2Fbraintrust-sdk-kotlin-a3cf5e2cde79fce2f8d595cfd5c3b44db6d2a5499e4623e62b5c280646867552.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ interface BraintrustClient {

fun prompt(): PromptService

fun promptSession(): PromptSessionService

fun role(): RoleService

fun group(): GroupService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ interface BraintrustClientAsync {

fun prompt(): PromptServiceAsync

fun promptSession(): PromptSessionServiceAsync

fun role(): RoleServiceAsync

fun group(): GroupServiceAsync
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,6 @@ constructor(

private val prompt: PromptServiceAsync by lazy { PromptServiceAsyncImpl(clientOptions) }

private val promptSession: PromptSessionServiceAsync by lazy {
PromptSessionServiceAsyncImpl(clientOptions)
}

private val role: RoleServiceAsync by lazy { RoleServiceAsyncImpl(clientOptions) }

private val group: GroupServiceAsync by lazy { GroupServiceAsyncImpl(clientOptions) }
Expand All @@ -54,8 +50,6 @@ constructor(

override fun prompt(): PromptServiceAsync = prompt

override fun promptSession(): PromptSessionServiceAsync = promptSession

override fun role(): RoleServiceAsync = role

override fun group(): GroupServiceAsync = group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ constructor(

private val prompt: PromptService by lazy { PromptServiceImpl(clientOptions) }

private val promptSession: PromptSessionService by lazy {
PromptSessionServiceImpl(clientOptions)
}

private val role: RoleService by lazy { RoleServiceImpl(clientOptions) }

private val group: GroupService by lazy { GroupServiceImpl(clientOptions) }
Expand All @@ -52,8 +48,6 @@ constructor(

override fun prompt(): PromptService = prompt

override fun promptSession(): PromptSessionService = promptSession

override fun role(): RoleService = role

override fun group(): GroupService = group
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ import com.fasterxml.jackson.module.kotlin.jacksonTypeRef
import java.time.OffsetDateTime
import java.util.Objects

@JsonDeserialize(builder = PromptCreateResponse.Builder::class)
@JsonDeserialize(builder = Prompt.Builder::class)
@NoAutoDetect
class PromptCreateResponse
class Prompt
private constructor(
private val id: JsonField<String>,
private val _xactId: JsonField<String>,
Expand Down Expand Up @@ -134,7 +134,7 @@ private constructor(
@ExcludeMissing
fun _additionalProperties(): Map<String, JsonValue> = additionalProperties

fun validate(): PromptCreateResponse = apply {
fun validate(): Prompt = apply {
if (!validated) {
id()
_xactId()
Expand All @@ -159,7 +159,7 @@ private constructor(
return true
}

return other is PromptCreateResponse &&
return other is Prompt &&
this.id == other.id &&
this._xactId == other._xactId &&
this.projectId == other.projectId &&
Expand Down Expand Up @@ -198,7 +198,7 @@ private constructor(
}

override fun toString() =
"PromptCreateResponse{id=$id, _xactId=$_xactId, projectId=$projectId, logId=$logId, orgId=$orgId, name=$name, slug=$slug, description=$description, created=$created, promptData=$promptData, tags=$tags, metadata=$metadata, additionalProperties=$additionalProperties}"
"Prompt{id=$id, _xactId=$_xactId, projectId=$projectId, logId=$logId, orgId=$orgId, name=$name, slug=$slug, description=$description, created=$created, promptData=$promptData, tags=$tags, metadata=$metadata, additionalProperties=$additionalProperties}"

companion object {

Expand All @@ -221,20 +221,20 @@ private constructor(
private var metadata: JsonField<Metadata> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

internal fun from(promptCreateResponse: PromptCreateResponse) = apply {
this.id = promptCreateResponse.id
this._xactId = promptCreateResponse._xactId
this.projectId = promptCreateResponse.projectId
this.logId = promptCreateResponse.logId
this.orgId = promptCreateResponse.orgId
this.name = promptCreateResponse.name
this.slug = promptCreateResponse.slug
this.description = promptCreateResponse.description
this.created = promptCreateResponse.created
this.promptData = promptCreateResponse.promptData
this.tags = promptCreateResponse.tags
this.metadata = promptCreateResponse.metadata
additionalProperties(promptCreateResponse.additionalProperties)
internal fun from(prompt: Prompt) = apply {
this.id = prompt.id
this._xactId = prompt._xactId
this.projectId = prompt.projectId
this.logId = prompt.logId
this.orgId = prompt.orgId
this.name = prompt.name
this.slug = prompt.slug
this.description = prompt.description
this.created = prompt.created
this.promptData = prompt.promptData
this.tags = prompt.tags
this.metadata = prompt.metadata
additionalProperties(prompt.additionalProperties)
}

/** Unique identifier for the prompt */
Expand Down Expand Up @@ -353,8 +353,8 @@ private constructor(
this.additionalProperties.putAll(additionalProperties)
}

fun build(): PromptCreateResponse =
PromptCreateResponse(
fun build(): Prompt =
Prompt(
id,
_xactId,
projectId,
Expand Down
Loading

0 comments on commit 23923fc

Please sign in to comment.