Package dev.dokimos.server.dto.v1
Record Class UpdateLlmConnectionRequest
java.lang.Object
java.lang.Record
dev.dokimos.server.dto.v1.UpdateLlmConnectionRequest
- Record Components:
name- the connection name (required)baseUrl- the OpenAI-compatible base URL (required)model- the model name (required)protocol- the API the endpoint speaks, or null to keep the current oneapiKey- a new inline API key, or null/blank to keep the current credentialcredentialRef- a new environment variable name to read the key from, or null/blank to keep it
public record UpdateLlmConnectionRequest(@NotBlank String name, @NotBlank String baseUrl, @NotBlank String model, LlmConnectionProtocol protocol, String apiKey, String credentialRef)
extends Record
Payload for updating an LLM connection. The name, base URL, and model are replaced. Leaving both
credential fields blank keeps the existing key; supplying
apiKey switches to (and encrypts)
a new inline key, and supplying credentialRef switches to an environment-backed key. At most
one credential field may be set. A non-null protocol replaces the API the endpoint speaks; a
null one keeps the current protocol.-
Constructor Summary
ConstructorsConstructorDescriptionUpdateLlmConnectionRequest(@NotBlank String name, @NotBlank String baseUrl, @NotBlank String model, LlmConnectionProtocol protocol, String apiKey, String credentialRef) Creates an instance of aUpdateLlmConnectionRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionapiKey()Returns the value of theapiKeyrecord component.@NotBlank StringbaseUrl()Returns the value of thebaseUrlrecord component.Returns the value of thecredentialRefrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@jakarta.validation.constraints.AssertTrue(message="at most one of apiKey or credentialRef may be set") boolean@NotBlank Stringmodel()Returns the value of themodelrecord component.@NotBlank Stringname()Returns the value of thenamerecord component.protocol()Returns the value of theprotocolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
UpdateLlmConnectionRequest
public UpdateLlmConnectionRequest(@NotBlank @NotBlank String name, @NotBlank @NotBlank String baseUrl, @NotBlank @NotBlank String model, LlmConnectionProtocol protocol, String apiKey, String credentialRef) Creates an instance of aUpdateLlmConnectionRequestrecord class.- Parameters:
name- the value for thenamerecord componentbaseUrl- the value for thebaseUrlrecord componentmodel- the value for themodelrecord componentprotocol- the value for theprotocolrecord componentapiKey- the value for theapiKeyrecord componentcredentialRef- the value for thecredentialRefrecord component
-
-
Method Details
-
isCredentialSourceValid
@AssertTrue(message="at most one of apiKey or credentialRef may be set") public @jakarta.validation.constraints.AssertTrue(message="at most one of apiKey or credentialRef may be set") boolean isCredentialSourceValid() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
baseUrl
Returns the value of thebaseUrlrecord component.- Returns:
- the value of the
baseUrlrecord component
-
model
Returns the value of themodelrecord component.- Returns:
- the value of the
modelrecord component
-
protocol
Returns the value of theprotocolrecord component.- Returns:
- the value of the
protocolrecord component
-
apiKey
Returns the value of theapiKeyrecord component.- Returns:
- the value of the
apiKeyrecord component
-
credentialRef
Returns the value of thecredentialRefrecord component.- Returns:
- the value of the
credentialRefrecord component
-