Sub2ApiAdminCreateGroupRequest constructor
Sub2ApiAdminCreateGroupRequest({
- required String name,
- String description = '',
- Sub2ApiAdminGroupPlatform? platform,
- Sub2ApiDecimal? rateMultiplier,
- bool isExclusive = false,
- Sub2ApiAdminGroupSubscriptionType? subscriptionType,
- Sub2ApiDecimal? dailyLimitUsd,
- Sub2ApiDecimal? weeklyLimitUsd,
- Sub2ApiDecimal? monthlyLimitUsd,
- bool longContextPricingEnabled = false,
- List<
Sub2ApiAdminModelPricing> modelPricing = const [], - bool allowImageGeneration = false,
- bool allowBatchImageGeneration = false,
- bool imageRateIndependent = false,
- Sub2ApiDecimal? imageRateMultiplier,
- Sub2ApiDecimal? batchImageDiscountMultiplier,
- Sub2ApiDecimal? batchImageHoldMultiplier,
- bool videoRateIndependent = false,
- Sub2ApiDecimal? videoRateMultiplier,
- bool peakRateEnabled = false,
- String peakStart = '',
- String peakEnd = '',
- Sub2ApiDecimal? peakRateMultiplier,
- bool profitControlEnabled = false,
- Sub2ApiDecimal? profitMinMargin,
- Sub2ApiDecimal? profitSafetyBuffer,
- Sub2ApiDecimal? imagePrice1k,
- Sub2ApiDecimal? imagePrice2k,
- Sub2ApiDecimal? imagePrice4k,
- Sub2ApiDecimal? videoPrice480p,
- Sub2ApiDecimal? videoPrice720p,
- Sub2ApiDecimal? videoPrice1080p,
- Map<
String, Map< videoModelPrices = const {},String, Sub2ApiDecimal> > - Sub2ApiDecimal? webSearchPricePerCall,
- Sub2ApiDecimal? searchPricePer1k,
- Sub2ApiDecimal? audioRealtimePricePerMin,
- Sub2ApiDecimal? audioTtsPricePerMillionChars,
- Sub2ApiDecimal? audioSttPricePerHour,
- bool claudeCodeOnly = false,
- int? fallbackGroupId,
- int? fallbackGroupIdOnInvalidRequest,
- Map<
String, List< modelRouting = const {},int> > - bool modelRoutingEnabled = false,
- bool? mcpXmlInject,
- List<
String> supportedModelScopes = const [], - bool allowMessagesDispatch = false,
- bool allowLive = false,
- bool requireOAuthOnly = false,
- bool requirePrivacySet = false,
- String defaultMappedModel = '',
- Sub2ApiAdminMessagesDispatchModelConfig? messagesDispatchModelConfig,
- Sub2ApiAdminGroupModelsListConfig? modelsListConfig,
- int rpmLimit = 0,
- String maxReasoningEffort = '',
- List<
Sub2ApiAdminReasoningEffortMapping> reasoningEffortMappings = const [], - List<
int> copyAccountsFromGroupIds = const [],
Implementation
Sub2ApiAdminCreateGroupRequest({
required this.name,
this.description = '',
this.platform,
this.rateMultiplier,
this.isExclusive = false,
this.subscriptionType,
this.dailyLimitUsd,
this.weeklyLimitUsd,
this.monthlyLimitUsd,
this.longContextPricingEnabled = false,
List<Sub2ApiAdminModelPricing> modelPricing = const [],
this.allowImageGeneration = false,
this.allowBatchImageGeneration = false,
this.imageRateIndependent = false,
this.imageRateMultiplier,
this.batchImageDiscountMultiplier,
this.batchImageHoldMultiplier,
this.videoRateIndependent = false,
this.videoRateMultiplier,
this.peakRateEnabled = false,
this.peakStart = '',
this.peakEnd = '',
this.peakRateMultiplier,
this.profitControlEnabled = false,
this.profitMinMargin,
this.profitSafetyBuffer,
this.imagePrice1k,
this.imagePrice2k,
this.imagePrice4k,
this.videoPrice480p,
this.videoPrice720p,
this.videoPrice1080p,
Map<String, Map<String, Sub2ApiDecimal>> videoModelPrices = const {},
this.webSearchPricePerCall,
this.searchPricePer1k,
this.audioRealtimePricePerMin,
this.audioTtsPricePerMillionChars,
this.audioSttPricePerHour,
this.claudeCodeOnly = false,
this.fallbackGroupId,
this.fallbackGroupIdOnInvalidRequest,
Map<String, List<int>> modelRouting = const {},
this.modelRoutingEnabled = false,
this.mcpXmlInject,
List<String> supportedModelScopes = const [],
this.allowMessagesDispatch = false,
this.allowLive = false,
this.requireOAuthOnly = false,
this.requirePrivacySet = false,
this.defaultMappedModel = '',
Sub2ApiAdminMessagesDispatchModelConfig? messagesDispatchModelConfig,
Sub2ApiAdminGroupModelsListConfig? modelsListConfig,
this.rpmLimit = 0,
this.maxReasoningEffort = '',
List<Sub2ApiAdminReasoningEffortMapping> reasoningEffortMappings = const [],
List<int> copyAccountsFromGroupIds = const [],
}) : modelPricing = List.unmodifiable(modelPricing),
videoModelPrices = Map.unmodifiable(
videoModelPrices.map(
(key, value) =>
MapEntry(key, Map<String, Sub2ApiDecimal>.unmodifiable(value)),
),
),
modelRouting = Map.unmodifiable(
modelRouting.map(
(key, value) => MapEntry(key, List<int>.unmodifiable(value)),
),
),
supportedModelScopes = List.unmodifiable(supportedModelScopes),
messagesDispatchModelConfig =
messagesDispatchModelConfig ??
Sub2ApiAdminMessagesDispatchModelConfig(
opusMappedModel: '',
sonnetMappedModel: '',
haikuMappedModel: '',
exactModelMappings: const {},
),
modelsListConfig =
modelsListConfig ??
Sub2ApiAdminGroupModelsListConfig(enabled: false, models: const []),
reasoningEffortMappings = List.unmodifiable(reasoningEffortMappings),
copyAccountsFromGroupIds = List.unmodifiable(copyAccountsFromGroupIds);