Record Class ProviderConfiguration

java.lang.Object
java.lang.Record
com.shaft.pilot.config.ProviderConfiguration
Record Components:
id - provider identifier
endpoint - provider endpoint
model - model identifier
apiKeyEnvironmentVariable - environment variable containing credentials, or blank for local providers
processingLocation - explicit processing location classification
options - non-secret provider protocol options

public record ProviderConfiguration(String id, URI endpoint, String model, String apiKeyEnvironmentVariable, ProcessingLocation processingLocation, Map<String,String> options) extends Record
Configuration for one direct provider.
  • Constructor Details

    • ProviderConfiguration

      public ProviderConfiguration(String id, URI endpoint, String model, String apiKeyEnvironmentVariable, Map<String,String> options)
      Creates a backward-compatible provider configuration.
    • ProviderConfiguration

      public ProviderConfiguration(String id, URI endpoint, String model, String apiKeyEnvironmentVariable, ProcessingLocation processingLocation, Map<String,String> options)
      Creates validated provider configuration.
  • Method Details

    • option

      public String option(String name)
      Returns a non-secret provider option.
      Parameters:
      name - option name
      Returns:
      option value, or an empty string
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • endpoint

      public URI endpoint()
      Returns the value of the endpoint record component.
      Returns:
      the value of the endpoint record component
    • model

      public String model()
      Returns the value of the model record component.
      Returns:
      the value of the model record component
    • apiKeyEnvironmentVariable

      public String apiKeyEnvironmentVariable()
      Returns the value of the apiKeyEnvironmentVariable record component.
      Returns:
      the value of the apiKeyEnvironmentVariable record component
    • processingLocation

      public ProcessingLocation processingLocation()
      Returns the value of the processingLocation record component.
      Returns:
      the value of the processingLocation record component
    • options

      public Map<String,String> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component