Sub2ApiAdminCreateGroupRequest constructor

Sub2ApiAdminCreateGroupRequest({
  1. required String name,
  2. String description = '',
  3. Sub2ApiAdminGroupPlatform? platform,
  4. Sub2ApiDecimal? rateMultiplier,
  5. bool isExclusive = false,
  6. Sub2ApiAdminGroupSubscriptionType? subscriptionType,
  7. Sub2ApiDecimal? dailyLimitUsd,
  8. Sub2ApiDecimal? weeklyLimitUsd,
  9. Sub2ApiDecimal? monthlyLimitUsd,
  10. bool longContextPricingEnabled = false,
  11. List<Sub2ApiAdminModelPricing> modelPricing = const [],
  12. bool allowImageGeneration = false,
  13. bool allowBatchImageGeneration = false,
  14. bool imageRateIndependent = false,
  15. Sub2ApiDecimal? imageRateMultiplier,
  16. Sub2ApiDecimal? batchImageDiscountMultiplier,
  17. Sub2ApiDecimal? batchImageHoldMultiplier,
  18. bool videoRateIndependent = false,
  19. Sub2ApiDecimal? videoRateMultiplier,
  20. bool peakRateEnabled = false,
  21. String peakStart = '',
  22. String peakEnd = '',
  23. Sub2ApiDecimal? peakRateMultiplier,
  24. bool profitControlEnabled = false,
  25. Sub2ApiDecimal? profitMinMargin,
  26. Sub2ApiDecimal? profitSafetyBuffer,
  27. Sub2ApiDecimal? imagePrice1k,
  28. Sub2ApiDecimal? imagePrice2k,
  29. Sub2ApiDecimal? imagePrice4k,
  30. Sub2ApiDecimal? videoPrice480p,
  31. Sub2ApiDecimal? videoPrice720p,
  32. Sub2ApiDecimal? videoPrice1080p,
  33. Map<String, Map<String, Sub2ApiDecimal>> videoModelPrices = const {},
  34. Sub2ApiDecimal? webSearchPricePerCall,
  35. Sub2ApiDecimal? searchPricePer1k,
  36. Sub2ApiDecimal? audioRealtimePricePerMin,
  37. Sub2ApiDecimal? audioTtsPricePerMillionChars,
  38. Sub2ApiDecimal? audioSttPricePerHour,
  39. bool claudeCodeOnly = false,
  40. int? fallbackGroupId,
  41. int? fallbackGroupIdOnInvalidRequest,
  42. Map<String, List<int>> modelRouting = const {},
  43. bool modelRoutingEnabled = false,
  44. bool? mcpXmlInject,
  45. List<String> supportedModelScopes = const [],
  46. bool allowMessagesDispatch = false,
  47. bool allowLive = false,
  48. bool requireOAuthOnly = false,
  49. bool requirePrivacySet = false,
  50. String defaultMappedModel = '',
  51. Sub2ApiAdminMessagesDispatchModelConfig? messagesDispatchModelConfig,
  52. Sub2ApiAdminGroupModelsListConfig? modelsListConfig,
  53. int rpmLimit = 0,
  54. String maxReasoningEffort = '',
  55. List<Sub2ApiAdminReasoningEffortMapping> reasoningEffortMappings = const [],
  56. 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);