Skip to content

Commit 7ff159f

Browse files
feat: Assistants: add observability
1 parent 35988c1 commit 7ff159f

15 files changed

Lines changed: 1605 additions & 6 deletions

File tree

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 1022
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-33cbf5a7803217f0b4f653e3cfe11f59ae821212732a0b7215e8b6ebf12fc691.yml
3-
openapi_spec_hash: 43717ce0d7ab539fa4454da3543fb24a
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/telnyx%2Ftelnyx-74ed8794a0763945bbe11cf8252cfd3a1716b86a4402c25ddd975c9b4b30337e.yml
3+
openapi_spec_hash: 6065f220701fcdccfa043d1e9f62fb54
44
config_hash: 99866288d7708b78505fc0cda04b349c

telnyx-core/src/main/kotlin/com/telnyx/sdk/models/ai/assistants/AssistantCreateParams.kt

Lines changed: 462 additions & 1 deletion
Large diffs are not rendered by default.

telnyx-core/src/main/kotlin/com/telnyx/sdk/models/ai/assistants/AssistantUpdateParams.kt

Lines changed: 81 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,13 @@ private constructor(
126126
*/
127127
fun name(): Optional<String> = body.name()
128128

129+
/**
130+
* @throws TelnyxInvalidDataException if the JSON field has an unexpected type (e.g. if the
131+
* server responded with an unexpected value).
132+
*/
133+
fun observabilitySettings(): Optional<UpdateAssistant.ObservabilitySettings> =
134+
body.observabilitySettings()
135+
129136
/**
130137
* @throws TelnyxInvalidDataException if the JSON field has an unexpected type (e.g. if the
131138
* server responded with an unexpected value).
@@ -261,6 +268,15 @@ private constructor(
261268
*/
262269
fun _name(): JsonField<String> = body._name()
263270

271+
/**
272+
* Returns the raw JSON value of [observabilitySettings].
273+
*
274+
* Unlike [observabilitySettings], this method doesn't throw if the JSON field has an unexpected
275+
* type.
276+
*/
277+
fun _observabilitySettings(): JsonField<UpdateAssistant.ObservabilitySettings> =
278+
body._observabilitySettings()
279+
264280
/**
265281
* Returns the raw JSON value of [privacySettings].
266282
*
@@ -553,6 +569,22 @@ private constructor(
553569
*/
554570
fun name(name: JsonField<String>) = apply { body.name(name) }
555571

572+
fun observabilitySettings(observabilitySettings: UpdateAssistant.ObservabilitySettings) =
573+
apply {
574+
body.observabilitySettings(observabilitySettings)
575+
}
576+
577+
/**
578+
* Sets [Builder.observabilitySettings] to an arbitrary JSON value.
579+
*
580+
* You should usually call [Builder.observabilitySettings] with a well-typed
581+
* [UpdateAssistant.ObservabilitySettings] value instead. This method is primarily for
582+
* setting the field to an undocumented or not yet supported value.
583+
*/
584+
fun observabilitySettings(
585+
observabilitySettings: JsonField<UpdateAssistant.ObservabilitySettings>
586+
) = apply { body.observabilitySettings(observabilitySettings) }
587+
556588
fun privacySettings(privacySettings: PrivacySettings) = apply {
557589
body.privacySettings(privacySettings)
558590
}
@@ -991,6 +1023,7 @@ private constructor(
9911023
private val messagingSettings: JsonField<MessagingSettings>,
9921024
private val model: JsonField<String>,
9931025
private val name: JsonField<String>,
1026+
private val observabilitySettings: JsonField<UpdateAssistant.ObservabilitySettings>,
9941027
private val privacySettings: JsonField<PrivacySettings>,
9951028
private val telephonySettings: JsonField<TelephonySettings>,
9961029
private val toolIds: JsonField<List<String>>,
@@ -1033,6 +1066,10 @@ private constructor(
10331066
messagingSettings: JsonField<MessagingSettings> = JsonMissing.of(),
10341067
@JsonProperty("model") @ExcludeMissing model: JsonField<String> = JsonMissing.of(),
10351068
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
1069+
@JsonProperty("observability_settings")
1070+
@ExcludeMissing
1071+
observabilitySettings: JsonField<UpdateAssistant.ObservabilitySettings> =
1072+
JsonMissing.of(),
10361073
@JsonProperty("privacy_settings")
10371074
@ExcludeMissing
10381075
privacySettings: JsonField<PrivacySettings> = JsonMissing.of(),
@@ -1069,6 +1106,7 @@ private constructor(
10691106
messagingSettings,
10701107
model,
10711108
name,
1109+
observabilitySettings,
10721110
privacySettings,
10731111
telephonySettings,
10741112
toolIds,
@@ -1093,6 +1131,7 @@ private constructor(
10931131
.messagingSettings(messagingSettings)
10941132
.model(model)
10951133
.name(name)
1134+
.observabilitySettings(observabilitySettings)
10961135
.privacySettings(privacySettings)
10971136
.telephonySettings(telephonySettings)
10981137
.toolIds(toolIds)
@@ -1199,6 +1238,13 @@ private constructor(
11991238
*/
12001239
fun name(): Optional<String> = name.getOptional("name")
12011240

1241+
/**
1242+
* @throws TelnyxInvalidDataException if the JSON field has an unexpected type (e.g. if the
1243+
* server responded with an unexpected value).
1244+
*/
1245+
fun observabilitySettings(): Optional<UpdateAssistant.ObservabilitySettings> =
1246+
observabilitySettings.getOptional("observability_settings")
1247+
12021248
/**
12031249
* @throws TelnyxInvalidDataException if the JSON field has an unexpected type (e.g. if the
12041250
* server responded with an unexpected value).
@@ -1358,6 +1404,17 @@ private constructor(
13581404
*/
13591405
@JsonProperty("name") @ExcludeMissing fun _name(): JsonField<String> = name
13601406

1407+
/**
1408+
* Returns the raw JSON value of [observabilitySettings].
1409+
*
1410+
* Unlike [observabilitySettings], this method doesn't throw if the JSON field has an
1411+
* unexpected type.
1412+
*/
1413+
@JsonProperty("observability_settings")
1414+
@ExcludeMissing
1415+
fun _observabilitySettings(): JsonField<UpdateAssistant.ObservabilitySettings> =
1416+
observabilitySettings
1417+
13611418
/**
13621419
* Returns the raw JSON value of [privacySettings].
13631420
*
@@ -1465,6 +1522,8 @@ private constructor(
14651522
private var messagingSettings: JsonField<MessagingSettings> = JsonMissing.of()
14661523
private var model: JsonField<String> = JsonMissing.of()
14671524
private var name: JsonField<String> = JsonMissing.of()
1525+
private var observabilitySettings: JsonField<UpdateAssistant.ObservabilitySettings> =
1526+
JsonMissing.of()
14681527
private var privacySettings: JsonField<PrivacySettings> = JsonMissing.of()
14691528
private var telephonySettings: JsonField<TelephonySettings> = JsonMissing.of()
14701529
private var toolIds: JsonField<MutableList<String>>? = null
@@ -1488,6 +1547,7 @@ private constructor(
14881547
messagingSettings = body.messagingSettings
14891548
model = body.model
14901549
name = body.name
1550+
observabilitySettings = body.observabilitySettings
14911551
privacySettings = body.privacySettings
14921552
telephonySettings = body.telephonySettings
14931553
toolIds = body.toolIds.map { it.toMutableList() }
@@ -1685,6 +1745,21 @@ private constructor(
16851745
*/
16861746
fun name(name: JsonField<String>) = apply { this.name = name }
16871747

1748+
fun observabilitySettings(
1749+
observabilitySettings: UpdateAssistant.ObservabilitySettings
1750+
) = observabilitySettings(JsonField.of(observabilitySettings))
1751+
1752+
/**
1753+
* Sets [Builder.observabilitySettings] to an arbitrary JSON value.
1754+
*
1755+
* You should usually call [Builder.observabilitySettings] with a well-typed
1756+
* [UpdateAssistant.ObservabilitySettings] value instead. This method is primarily for
1757+
* setting the field to an undocumented or not yet supported value.
1758+
*/
1759+
fun observabilitySettings(
1760+
observabilitySettings: JsonField<UpdateAssistant.ObservabilitySettings>
1761+
) = apply { this.observabilitySettings = observabilitySettings }
1762+
16881763
fun privacySettings(privacySettings: PrivacySettings) =
16891764
privacySettings(JsonField.of(privacySettings))
16901765

@@ -2023,6 +2098,7 @@ private constructor(
20232098
messagingSettings,
20242099
model,
20252100
name,
2101+
observabilitySettings,
20262102
privacySettings,
20272103
telephonySettings,
20282104
(toolIds ?: JsonMissing.of()).map { it.toImmutable() },
@@ -2053,6 +2129,7 @@ private constructor(
20532129
messagingSettings().ifPresent { it.validate() }
20542130
model()
20552131
name()
2132+
observabilitySettings().ifPresent { it.validate() }
20562133
privacySettings().ifPresent { it.validate() }
20572134
telephonySettings().ifPresent { it.validate() }
20582135
toolIds()
@@ -2091,6 +2168,7 @@ private constructor(
20912168
(messagingSettings.asKnown().getOrNull()?.validity() ?: 0) +
20922169
(if (model.asKnown().isPresent) 1 else 0) +
20932170
(if (name.asKnown().isPresent) 1 else 0) +
2171+
(observabilitySettings.asKnown().getOrNull()?.validity() ?: 0) +
20942172
(privacySettings.asKnown().getOrNull()?.validity() ?: 0) +
20952173
(telephonySettings.asKnown().getOrNull()?.validity() ?: 0) +
20962174
(toolIds.asKnown().getOrNull()?.size ?: 0) +
@@ -2117,6 +2195,7 @@ private constructor(
21172195
messagingSettings == other.messagingSettings &&
21182196
model == other.model &&
21192197
name == other.name &&
2198+
observabilitySettings == other.observabilitySettings &&
21202199
privacySettings == other.privacySettings &&
21212200
telephonySettings == other.telephonySettings &&
21222201
toolIds == other.toolIds &&
@@ -2141,6 +2220,7 @@ private constructor(
21412220
messagingSettings,
21422221
model,
21432222
name,
2223+
observabilitySettings,
21442224
privacySettings,
21452225
telephonySettings,
21462226
toolIds,
@@ -2156,7 +2236,7 @@ private constructor(
21562236
override fun hashCode(): Int = hashCode
21572237

21582238
override fun toString() =
2159-
"Body{description=$description, dynamicVariables=$dynamicVariables, dynamicVariablesWebhookUrl=$dynamicVariablesWebhookUrl, enabledFeatures=$enabledFeatures, greeting=$greeting, insightSettings=$insightSettings, instructions=$instructions, llmApiKeyRef=$llmApiKeyRef, messagingSettings=$messagingSettings, model=$model, name=$name, privacySettings=$privacySettings, telephonySettings=$telephonySettings, toolIds=$toolIds, tools=$tools, transcription=$transcription, voiceSettings=$voiceSettings, widgetSettings=$widgetSettings, promoteToMain=$promoteToMain, additionalProperties=$additionalProperties}"
2239+
"Body{description=$description, dynamicVariables=$dynamicVariables, dynamicVariablesWebhookUrl=$dynamicVariablesWebhookUrl, enabledFeatures=$enabledFeatures, greeting=$greeting, insightSettings=$insightSettings, instructions=$instructions, llmApiKeyRef=$llmApiKeyRef, messagingSettings=$messagingSettings, model=$model, name=$name, observabilitySettings=$observabilitySettings, privacySettings=$privacySettings, telephonySettings=$telephonySettings, toolIds=$toolIds, tools=$tools, transcription=$transcription, voiceSettings=$voiceSettings, widgetSettings=$widgetSettings, promoteToMain=$promoteToMain, additionalProperties=$additionalProperties}"
21602240
}
21612241

21622242
override fun equals(other: Any?): Boolean {

0 commit comments

Comments
 (0)