pub struct CreateModelRequestBuilder<S: State = Empty> { /* private fields */ }Expand description
Use builder syntax to set the inputs and finish with build().
Implementations§
Source§impl<S: State> CreateModelRequestBuilder<S>
impl<S: State> CreateModelRequestBuilder<S>
Sourcepub fn build(self) -> CreateModelRequestwhere
S: IsComplete,
pub fn build(self) -> CreateModelRequestwhere
S: IsComplete,
Finish building and return the requested object
Sourcepub fn model_name(
self,
value: String,
) -> CreateModelRequestBuilder<SetModelName<S>>where
S::ModelName: IsUnset,
pub fn model_name(
self,
value: String,
) -> CreateModelRequestBuilder<SetModelName<S>>where
S::ModelName: IsUnset,
Required.
Name of the model definition. If multiple with the same name exist, they are applied in the following order: (1) custom over built-in, (2) newest according to startTime where model.startTime<observation.startTime
Sourcepub fn match_pattern(
self,
value: String,
) -> CreateModelRequestBuilder<SetMatchPattern<S>>where
S::MatchPattern: IsUnset,
pub fn match_pattern(
self,
value: String,
) -> CreateModelRequestBuilder<SetMatchPattern<S>>where
S::MatchPattern: IsUnset,
Required.
Regex pattern which matches this model definition to generation.model. Useful in case of fine-tuned models. If you want to exact match, use (?i)^modelname$
Sourcepub fn start_date(
self,
value: Option<String>,
) -> CreateModelRequestBuilder<SetStartDate<S>>where
S::StartDate: IsUnset,
pub fn start_date(
self,
value: Option<String>,
) -> CreateModelRequestBuilder<SetStartDate<S>>where
S::StartDate: IsUnset,
Sourcepub fn maybe_start_date(
self,
value: Option<Option<String>>,
) -> CreateModelRequestBuilder<SetStartDate<S>>where
S::StartDate: IsUnset,
pub fn maybe_start_date(
self,
value: Option<Option<String>>,
) -> CreateModelRequestBuilder<SetStartDate<S>>where
S::StartDate: IsUnset,
Sourcepub fn unit(
self,
value: ModelUsageUnit,
) -> CreateModelRequestBuilder<SetUnit<S>>where
S::Unit: IsUnset,
pub fn unit(
self,
value: ModelUsageUnit,
) -> CreateModelRequestBuilder<SetUnit<S>>where
S::Unit: IsUnset,
Sourcepub fn maybe_unit(
self,
value: Option<ModelUsageUnit>,
) -> CreateModelRequestBuilder<SetUnit<S>>where
S::Unit: IsUnset,
pub fn maybe_unit(
self,
value: Option<ModelUsageUnit>,
) -> CreateModelRequestBuilder<SetUnit<S>>where
S::Unit: IsUnset,
Sourcepub fn input_price(
self,
value: Option<f64>,
) -> CreateModelRequestBuilder<SetInputPrice<S>>where
S::InputPrice: IsUnset,
pub fn input_price(
self,
value: Option<f64>,
) -> CreateModelRequestBuilder<SetInputPrice<S>>where
S::InputPrice: IsUnset,
Sourcepub fn maybe_input_price(
self,
value: Option<Option<f64>>,
) -> CreateModelRequestBuilder<SetInputPrice<S>>where
S::InputPrice: IsUnset,
pub fn maybe_input_price(
self,
value: Option<Option<f64>>,
) -> CreateModelRequestBuilder<SetInputPrice<S>>where
S::InputPrice: IsUnset,
Sourcepub fn output_price(
self,
value: Option<f64>,
) -> CreateModelRequestBuilder<SetOutputPrice<S>>where
S::OutputPrice: IsUnset,
pub fn output_price(
self,
value: Option<f64>,
) -> CreateModelRequestBuilder<SetOutputPrice<S>>where
S::OutputPrice: IsUnset,
Sourcepub fn maybe_output_price(
self,
value: Option<Option<f64>>,
) -> CreateModelRequestBuilder<SetOutputPrice<S>>where
S::OutputPrice: IsUnset,
pub fn maybe_output_price(
self,
value: Option<Option<f64>>,
) -> CreateModelRequestBuilder<SetOutputPrice<S>>where
S::OutputPrice: IsUnset,
Sourcepub fn total_price(
self,
value: Option<f64>,
) -> CreateModelRequestBuilder<SetTotalPrice<S>>where
S::TotalPrice: IsUnset,
pub fn total_price(
self,
value: Option<f64>,
) -> CreateModelRequestBuilder<SetTotalPrice<S>>where
S::TotalPrice: IsUnset,
Sourcepub fn maybe_total_price(
self,
value: Option<Option<f64>>,
) -> CreateModelRequestBuilder<SetTotalPrice<S>>where
S::TotalPrice: IsUnset,
pub fn maybe_total_price(
self,
value: Option<Option<f64>>,
) -> CreateModelRequestBuilder<SetTotalPrice<S>>where
S::TotalPrice: IsUnset,
Sourcepub fn pricing_tiers(
self,
value: Option<Vec<PricingTierInput>>,
) -> CreateModelRequestBuilder<SetPricingTiers<S>>where
S::PricingTiers: IsUnset,
pub fn pricing_tiers(
self,
value: Option<Vec<PricingTierInput>>,
) -> CreateModelRequestBuilder<SetPricingTiers<S>>where
S::PricingTiers: IsUnset,
Optional (Some / Option setters).
Optional. Array of pricing tiers for this model. Use pricing tiers for all models - both those with threshold-based pricing variations and those with simple flat pricing: - For models with standard flat pricing: Create a single default tier with your prices (e.g., one tier with isDefault=true, priority=0, conditions=[], and your standard prices) - For models with threshold-based pricing: Create a default tier plus additional conditional tiers (e.g., default tier for standard usage + high-volume tier for usage above certain thresholds) Requirements: - Cannot be provided with flat prices (inputPrice/outputPrice/totalPrice) - use one approach or the other - Must include exactly one default tier with isDefault=true, priority=0, and conditions=[] - All tier names and priorities must be unique within the model - Each tier must define at least one price If omitted, you must provide flat prices instead (inputPrice/outputPrice/totalPrice), which will automatically create a single default tier named "Standard".
Sourcepub fn maybe_pricing_tiers(
self,
value: Option<Option<Vec<PricingTierInput>>>,
) -> CreateModelRequestBuilder<SetPricingTiers<S>>where
S::PricingTiers: IsUnset,
pub fn maybe_pricing_tiers(
self,
value: Option<Option<Vec<PricingTierInput>>>,
) -> CreateModelRequestBuilder<SetPricingTiers<S>>where
S::PricingTiers: IsUnset,
Optional (Some / Option setters).
Optional. Array of pricing tiers for this model. Use pricing tiers for all models - both those with threshold-based pricing variations and those with simple flat pricing: - For models with standard flat pricing: Create a single default tier with your prices (e.g., one tier with isDefault=true, priority=0, conditions=[], and your standard prices) - For models with threshold-based pricing: Create a default tier plus additional conditional tiers (e.g., default tier for standard usage + high-volume tier for usage above certain thresholds) Requirements: - Cannot be provided with flat prices (inputPrice/outputPrice/totalPrice) - use one approach or the other - Must include exactly one default tier with isDefault=true, priority=0, and conditions=[] - All tier names and priorities must be unique within the model - Each tier must define at least one price If omitted, you must provide flat prices instead (inputPrice/outputPrice/totalPrice), which will automatically create a single default tier named "Standard".