CreateDecisionModelRequest
Rust struct goodmem::models::CreateDecisionModelRequest: declaration, fields or variants, and implementations.
Struct CreateDecisionModelRequest
goodmem::models::CreateDecisionModelRequest
Connection settings for a new decision model.
pub struct CreateDecisionModelRequest {
pub display_name: String,
pub description: Option<String>,
pub provider_type: DecisionModelProviderType,
pub endpoint_url: String,
pub api_path: Option<String>,
pub model_identifier: String,
pub credentials: Option<Box<EndpointAuthentication>>,
pub configuration: Option<BTreeMap<String, serde_json::Value>>,
pub labels: Option<BTreeMap<String, String>>,
pub version: Option<String>,
pub monitoring_endpoint: Option<String>,
pub owner_id: Option<String>,
pub decision_model_id: Option<String>,
}Referenced types: DecisionModelProviderType, EndpointAuthentication.
Fields
display_name
pub display_name: String
Name shown in the console and CLI.
Wire name: displayName.
description
pub description: Option<String>
Optional description.
Wire name: description.
provider_type
pub provider_type: DecisionModelProviderType
Provider used by this model. This cannot be changed after creation.
Wire name: providerType.
endpoint_url
pub endpoint_url: String
Base URL of the provider, starting with http:// or <https://.> Do not include a query string, fragment, or username and password.
Wire name: endpointUrl.
api_path
pub api_path: Option<String>
Path appended to endpointUrl when sending a request. Jev and Laya use /v1/systemone if omitted. Clef requires the path for your account and model.
Wire name: apiPath.
model_identifier
pub model_identifier: String
Model identifier accepted by the provider.
Wire name: modelIdentifier.
credentials
pub credentials: Option<Box<EndpointAuthentication>>
API key for the provider, supplied in credentials.apiKey.inlineSecret with kind set to CREDENTIAL_KIND_API_KEY. May be omitted for Laya when the endpoint allows anonymous access.
Wire name: credentials.
configuration
pub configuration: Option<BTreeMap<String, serde_json::Value>>
Provider settings. Supported keys are image_preview (Jev only), timeout_millis, and max_response_bytes. These settings cannot change which features the model supports.
Wire name: configuration.
labels
pub labels: Option<BTreeMap<String, String>>
Labels for filtering and organization.
Wire name: labels.
version
pub version: Option<String>
Optional version label.
Wire name: version.
monitoring_endpoint
pub monitoring_endpoint: Option<String>
Optional URL for the provider health or metrics endpoint. Must start with http:// or <https://.>
Wire name: monitoringEndpoint.
owner_id
pub owner_id: Option<String>
UUID of the principal that will own the model. If omitted, the authenticated principal becomes the owner.
Wire name: ownerId.
decision_model_id
pub decision_model_id: Option<String>
Optional UUID for the new model. GoodMem generates one if omitted. A UUID that is already in use returns 409; reusing connection settings is allowed.
Wire name: decisionModelId.
Implementations
validate
pub fn validate(&self) -> crate::Result<()>
Validate the request before sending, without making an HTTP call.
Trait implementations
Clone(derived)Default(derived)PartialEq(derived)Serialize(derived)impl<'de> Deserialize<'de> for CreateDecisionModelRequestimpl std::fmt::Debug for CreateDecisionModelRequest