|
14 | 14 | import com.vapi.api.core.ObjectMappers;
|
15 | 15 | import com.vapi.api.resources.assistants.types.UpdateAssistantDtoBackgroundSound;
|
16 | 16 | import com.vapi.api.resources.assistants.types.UpdateAssistantDtoClientMessagesItem;
|
| 17 | +import com.vapi.api.resources.assistants.types.UpdateAssistantDtoCredentialsItem; |
17 | 18 | import com.vapi.api.resources.assistants.types.UpdateAssistantDtoFirstMessageMode;
|
18 | 19 | import com.vapi.api.resources.assistants.types.UpdateAssistantDtoModel;
|
19 | 20 | import com.vapi.api.resources.assistants.types.UpdateAssistantDtoServerMessagesItem;
|
@@ -65,6 +66,8 @@ public final class UpdateAssistantDto {
|
65 | 66 |
|
66 | 67 | private final Optional<List<TransportConfigurationTwilio>> transportConfigurations;
|
67 | 68 |
|
| 69 | + private final Optional<List<UpdateAssistantDtoCredentialsItem>> credentials; |
| 70 | + |
68 | 71 | private final Optional<String> name;
|
69 | 72 |
|
70 | 73 | private final Optional<TwilioVoicemailDetection> voicemailDetection;
|
@@ -110,6 +113,7 @@ private UpdateAssistantDto(
|
110 | 113 | Optional<Boolean> backgroundDenoisingEnabled,
|
111 | 114 | Optional<Boolean> modelOutputInMessagesEnabled,
|
112 | 115 | Optional<List<TransportConfigurationTwilio>> transportConfigurations,
|
| 116 | + Optional<List<UpdateAssistantDtoCredentialsItem>> credentials, |
113 | 117 | Optional<String> name,
|
114 | 118 | Optional<TwilioVoicemailDetection> voicemailDetection,
|
115 | 119 | Optional<String> voicemailMessage,
|
@@ -139,6 +143,7 @@ private UpdateAssistantDto(
|
139 | 143 | this.backgroundDenoisingEnabled = backgroundDenoisingEnabled;
|
140 | 144 | this.modelOutputInMessagesEnabled = modelOutputInMessagesEnabled;
|
141 | 145 | this.transportConfigurations = transportConfigurations;
|
| 146 | + this.credentials = credentials; |
142 | 147 | this.name = name;
|
143 | 148 | this.voicemailDetection = voicemailDetection;
|
144 | 149 | this.voicemailMessage = voicemailMessage;
|
@@ -282,6 +287,14 @@ public Optional<List<TransportConfigurationTwilio>> getTransportConfigurations()
|
282 | 287 | return transportConfigurations;
|
283 | 288 | }
|
284 | 289 |
|
| 290 | + /** |
| 291 | + * @return These are dynamic credentials that will be used for the assistant calls. By default, all the credentials are available for use in the call but you can supplement an additional credentials using this. Dynamic credentials override existing credentials. |
| 292 | + */ |
| 293 | + @JsonProperty("credentials") |
| 294 | + public Optional<List<UpdateAssistantDtoCredentialsItem>> getCredentials() { |
| 295 | + return credentials; |
| 296 | + } |
| 297 | + |
285 | 298 | /**
|
286 | 299 | * @return This is the name of the assistant.
|
287 | 300 | * <p>This is required when you want to transfer between assistants in a call.</p>
|
@@ -453,6 +466,7 @@ private boolean equalTo(UpdateAssistantDto other) {
|
453 | 466 | && backgroundDenoisingEnabled.equals(other.backgroundDenoisingEnabled)
|
454 | 467 | && modelOutputInMessagesEnabled.equals(other.modelOutputInMessagesEnabled)
|
455 | 468 | && transportConfigurations.equals(other.transportConfigurations)
|
| 469 | + && credentials.equals(other.credentials) |
456 | 470 | && name.equals(other.name)
|
457 | 471 | && voicemailDetection.equals(other.voicemailDetection)
|
458 | 472 | && voicemailMessage.equals(other.voicemailMessage)
|
@@ -486,6 +500,7 @@ public int hashCode() {
|
486 | 500 | this.backgroundDenoisingEnabled,
|
487 | 501 | this.modelOutputInMessagesEnabled,
|
488 | 502 | this.transportConfigurations,
|
| 503 | + this.credentials, |
489 | 504 | this.name,
|
490 | 505 | this.voicemailDetection,
|
491 | 506 | this.voicemailMessage,
|
@@ -541,6 +556,8 @@ public static final class Builder {
|
541 | 556 |
|
542 | 557 | private Optional<List<TransportConfigurationTwilio>> transportConfigurations = Optional.empty();
|
543 | 558 |
|
| 559 | + private Optional<List<UpdateAssistantDtoCredentialsItem>> credentials = Optional.empty(); |
| 560 | + |
544 | 561 | private Optional<String> name = Optional.empty();
|
545 | 562 |
|
546 | 563 | private Optional<TwilioVoicemailDetection> voicemailDetection = Optional.empty();
|
@@ -589,6 +606,7 @@ public Builder from(UpdateAssistantDto other) {
|
589 | 606 | backgroundDenoisingEnabled(other.getBackgroundDenoisingEnabled());
|
590 | 607 | modelOutputInMessagesEnabled(other.getModelOutputInMessagesEnabled());
|
591 | 608 | transportConfigurations(other.getTransportConfigurations());
|
| 609 | + credentials(other.getCredentials()); |
592 | 610 | name(other.getName());
|
593 | 611 | voicemailDetection(other.getVoicemailDetection());
|
594 | 612 | voicemailMessage(other.getVoicemailMessage());
|
@@ -760,6 +778,17 @@ public Builder transportConfigurations(List<TransportConfigurationTwilio> transp
|
760 | 778 | return this;
|
761 | 779 | }
|
762 | 780 |
|
| 781 | + @JsonSetter(value = "credentials", nulls = Nulls.SKIP) |
| 782 | + public Builder credentials(Optional<List<UpdateAssistantDtoCredentialsItem>> credentials) { |
| 783 | + this.credentials = credentials; |
| 784 | + return this; |
| 785 | + } |
| 786 | + |
| 787 | + public Builder credentials(List<UpdateAssistantDtoCredentialsItem> credentials) { |
| 788 | + this.credentials = Optional.ofNullable(credentials); |
| 789 | + return this; |
| 790 | + } |
| 791 | + |
763 | 792 | @JsonSetter(value = "name", nulls = Nulls.SKIP)
|
764 | 793 | public Builder name(Optional<String> name) {
|
765 | 794 | this.name = name;
|
@@ -930,6 +959,7 @@ public UpdateAssistantDto build() {
|
930 | 959 | backgroundDenoisingEnabled,
|
931 | 960 | modelOutputInMessagesEnabled,
|
932 | 961 | transportConfigurations,
|
| 962 | + credentials, |
933 | 963 | name,
|
934 | 964 | voicemailDetection,
|
935 | 965 | voicemailMessage,
|
|
0 commit comments