Class: LiteLLMClient::UserAPIKeyAuth

Inherits:
Object
  • Object
show all
Defined in:
lib/litellm_client/models/user_api_key_auth.rb

Overview

Return the row in the db

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UserAPIKeyAuth

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 355

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `LiteLLMClient::UserAPIKeyAuth` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `LiteLLMClient::UserAPIKeyAuth`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'token')
    self.token = attributes[:'token']
  end

  if attributes.key?(:'key_name')
    self.key_name = attributes[:'key_name']
  end

  if attributes.key?(:'key_alias')
    self.key_alias = attributes[:'key_alias']
  end

  if attributes.key?(:'spend')
    self.spend = attributes[:'spend']
  else
    self.spend = 0.0
  end

  if attributes.key?(:'max_budget')
    self.max_budget = attributes[:'max_budget']
  end

  if attributes.key?(:'expires')
    self.expires = attributes[:'expires']
  end

  if attributes.key?(:'models')
    if (value = attributes[:'models']).is_a?(Array)
      self.models = value
    end
  end

  if attributes.key?(:'aliases')
    if (value = attributes[:'aliases']).is_a?(Hash)
      self.aliases = value
    end
  end

  if attributes.key?(:'config')
    if (value = attributes[:'config']).is_a?(Hash)
      self.config = value
    end
  end

  if attributes.key?(:'user_id')
    self.user_id = attributes[:'user_id']
  end

  if attributes.key?(:'team_id')
    self.team_id = attributes[:'team_id']
  end

  if attributes.key?(:'max_parallel_requests')
    self.max_parallel_requests = attributes[:'max_parallel_requests']
  end

  if attributes.key?(:'metadata')
    if (value = attributes[:'metadata']).is_a?(Hash)
      self. = value
    end
  end

  if attributes.key?(:'tpm_limit')
    self.tpm_limit = attributes[:'tpm_limit']
  end

  if attributes.key?(:'rpm_limit')
    self.rpm_limit = attributes[:'rpm_limit']
  end

  if attributes.key?(:'budget_duration')
    self.budget_duration = attributes[:'budget_duration']
  end

  if attributes.key?(:'budget_reset_at')
    self.budget_reset_at = attributes[:'budget_reset_at']
  end

  if attributes.key?(:'allowed_cache_controls')
    if (value = attributes[:'allowed_cache_controls']).is_a?(Array)
      self.allowed_cache_controls = value
    end
  end

  if attributes.key?(:'allowed_routes')
    if (value = attributes[:'allowed_routes']).is_a?(Array)
      self.allowed_routes = value
    end
  end

  if attributes.key?(:'permissions')
    if (value = attributes[:'permissions']).is_a?(Hash)
      self.permissions = value
    end
  end

  if attributes.key?(:'model_spend')
    if (value = attributes[:'model_spend']).is_a?(Hash)
      self.model_spend = value
    end
  end

  if attributes.key?(:'model_max_budget')
    if (value = attributes[:'model_max_budget']).is_a?(Hash)
      self.model_max_budget = value
    end
  end

  if attributes.key?(:'soft_budget_cooldown')
    self.soft_budget_cooldown = attributes[:'soft_budget_cooldown']
  else
    self.soft_budget_cooldown = false
  end

  if attributes.key?(:'blocked')
    self.blocked = attributes[:'blocked']
  end

  if attributes.key?(:'litellm_budget_table')
    if (value = attributes[:'litellm_budget_table']).is_a?(Hash)
      self.litellm_budget_table = value
    end
  end

  if attributes.key?(:'org_id')
    self.org_id = attributes[:'org_id']
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  end

  if attributes.key?(:'created_by')
    self.created_by = attributes[:'created_by']
  end

  if attributes.key?(:'updated_at')
    self.updated_at = attributes[:'updated_at']
  end

  if attributes.key?(:'updated_by')
    self.updated_by = attributes[:'updated_by']
  end

  if attributes.key?(:'object_permission_id')
    self.object_permission_id = attributes[:'object_permission_id']
  end

  if attributes.key?(:'object_permission')
    self.object_permission = attributes[:'object_permission']
  end

  if attributes.key?(:'team_spend')
    self.team_spend = attributes[:'team_spend']
  end

  if attributes.key?(:'team_alias')
    self.team_alias = attributes[:'team_alias']
  end

  if attributes.key?(:'team_tpm_limit')
    self.team_tpm_limit = attributes[:'team_tpm_limit']
  end

  if attributes.key?(:'team_rpm_limit')
    self.team_rpm_limit = attributes[:'team_rpm_limit']
  end

  if attributes.key?(:'team_max_budget')
    self.team_max_budget = attributes[:'team_max_budget']
  end

  if attributes.key?(:'team_models')
    if (value = attributes[:'team_models']).is_a?(Array)
      self.team_models = value
    end
  end

  if attributes.key?(:'team_blocked')
    self.team_blocked = attributes[:'team_blocked']
  else
    self.team_blocked = false
  end

  if attributes.key?(:'soft_budget')
    self.soft_budget = attributes[:'soft_budget']
  end

  if attributes.key?(:'team_model_aliases')
    if (value = attributes[:'team_model_aliases']).is_a?(Hash)
      self.team_model_aliases = value
    end
  end

  if attributes.key?(:'team_member_spend')
    self.team_member_spend = attributes[:'team_member_spend']
  end

  if attributes.key?(:'team_member')
    self.team_member = attributes[:'team_member']
  end

  if attributes.key?(:'team_metadata')
    if (value = attributes[:'team_metadata']).is_a?(Hash)
      self. = value
    end
  end

  if attributes.key?(:'end_user_id')
    self.end_user_id = attributes[:'end_user_id']
  end

  if attributes.key?(:'end_user_tpm_limit')
    self.end_user_tpm_limit = attributes[:'end_user_tpm_limit']
  end

  if attributes.key?(:'end_user_rpm_limit')
    self.end_user_rpm_limit = attributes[:'end_user_rpm_limit']
  end

  if attributes.key?(:'end_user_max_budget')
    self.end_user_max_budget = attributes[:'end_user_max_budget']
  end

  if attributes.key?(:'last_refreshed_at')
    self.last_refreshed_at = attributes[:'last_refreshed_at']
  end

  if attributes.key?(:'api_key')
    self.api_key = attributes[:'api_key']
  end

  if attributes.key?(:'user_role')
    self.user_role = attributes[:'user_role']
  end

  if attributes.key?(:'allowed_model_region')
    self.allowed_model_region = attributes[:'allowed_model_region']
  end

  if attributes.key?(:'parent_otel_span')
    self.parent_otel_span = attributes[:'parent_otel_span']
  end

  if attributes.key?(:'rpm_limit_per_model')
    if (value = attributes[:'rpm_limit_per_model']).is_a?(Hash)
      self.rpm_limit_per_model = value
    end
  end

  if attributes.key?(:'tpm_limit_per_model')
    if (value = attributes[:'tpm_limit_per_model']).is_a?(Hash)
      self.tpm_limit_per_model = value
    end
  end

  if attributes.key?(:'user_tpm_limit')
    self.user_tpm_limit = attributes[:'user_tpm_limit']
  end

  if attributes.key?(:'user_rpm_limit')
    self.user_rpm_limit = attributes[:'user_rpm_limit']
  end

  if attributes.key?(:'user_email')
    self.user_email = attributes[:'user_email']
  end

  if attributes.key?(:'request_route')
    self.request_route = attributes[:'request_route']
  end
end

Instance Attribute Details

#aliasesObject

Returns the value of attribute aliases.



33
34
35
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 33

def aliases
  @aliases
end

#allowed_cache_controlsObject

Returns the value of attribute allowed_cache_controls.



53
54
55
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 53

def allowed_cache_controls
  @allowed_cache_controls
end

#allowed_model_regionObject

Returns the value of attribute allowed_model_region.



121
122
123
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 121

def allowed_model_region
  @allowed_model_region
end

#allowed_routesObject

Returns the value of attribute allowed_routes.



55
56
57
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 55

def allowed_routes
  @allowed_routes
end

#api_keyObject

Returns the value of attribute api_key.



117
118
119
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 117

def api_key
  @api_key
end

#blockedObject

Returns the value of attribute blocked.



65
66
67
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 65

def blocked
  @blocked
end

#budget_durationObject

Returns the value of attribute budget_duration.



49
50
51
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 49

def budget_duration
  @budget_duration
end

#budget_reset_atObject

Returns the value of attribute budget_reset_at.



51
52
53
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 51

def budget_reset_at
  @budget_reset_at
end

#configObject

Returns the value of attribute config.



35
36
37
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 35

def config
  @config
end

#created_atObject

Returns the value of attribute created_at.



71
72
73
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 71

def created_at
  @created_at
end

#created_byObject

Returns the value of attribute created_by.



73
74
75
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 73

def created_by
  @created_by
end

#end_user_idObject

Returns the value of attribute end_user_id.



107
108
109
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 107

def end_user_id
  @end_user_id
end

#end_user_max_budgetObject

Returns the value of attribute end_user_max_budget.



113
114
115
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 113

def end_user_max_budget
  @end_user_max_budget
end

#end_user_rpm_limitObject

Returns the value of attribute end_user_rpm_limit.



111
112
113
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 111

def end_user_rpm_limit
  @end_user_rpm_limit
end

#end_user_tpm_limitObject

Returns the value of attribute end_user_tpm_limit.



109
110
111
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 109

def end_user_tpm_limit
  @end_user_tpm_limit
end

#expiresObject

Returns the value of attribute expires.



29
30
31
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 29

def expires
  @expires
end

#key_aliasObject

Returns the value of attribute key_alias.



23
24
25
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 23

def key_alias
  @key_alias
end

#key_nameObject

Returns the value of attribute key_name.



21
22
23
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 21

def key_name
  @key_name
end

#last_refreshed_atObject

Returns the value of attribute last_refreshed_at.



115
116
117
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 115

def last_refreshed_at
  @last_refreshed_at
end

#litellm_budget_tableObject

Returns the value of attribute litellm_budget_table.



67
68
69
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 67

def litellm_budget_table
  @litellm_budget_table
end

#max_budgetObject

Returns the value of attribute max_budget.



27
28
29
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 27

def max_budget
  @max_budget
end

#max_parallel_requestsObject

Returns the value of attribute max_parallel_requests.



41
42
43
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 41

def max_parallel_requests
  @max_parallel_requests
end

#metadataObject

Returns the value of attribute metadata.



43
44
45
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 43

def 
  @metadata
end

#model_max_budgetObject

Returns the value of attribute model_max_budget.



61
62
63
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 61

def model_max_budget
  @model_max_budget
end

#model_spendObject

Returns the value of attribute model_spend.



59
60
61
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 59

def model_spend
  @model_spend
end

#modelsObject

Returns the value of attribute models.



31
32
33
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 31

def models
  @models
end

#object_permissionObject

Returns the value of attribute object_permission.



81
82
83
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 81

def object_permission
  @object_permission
end

#object_permission_idObject

Returns the value of attribute object_permission_id.



79
80
81
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 79

def object_permission_id
  @object_permission_id
end

#org_idObject

Returns the value of attribute org_id.



69
70
71
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 69

def org_id
  @org_id
end

#parent_otel_spanObject

Returns the value of attribute parent_otel_span.



123
124
125
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 123

def parent_otel_span
  @parent_otel_span
end

#permissionsObject

Returns the value of attribute permissions.



57
58
59
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 57

def permissions
  @permissions
end

#request_routeObject

Returns the value of attribute request_route.



135
136
137
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 135

def request_route
  @request_route
end

#rpm_limitObject

Returns the value of attribute rpm_limit.



47
48
49
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 47

def rpm_limit
  @rpm_limit
end

#rpm_limit_per_modelObject

Returns the value of attribute rpm_limit_per_model.



125
126
127
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 125

def rpm_limit_per_model
  @rpm_limit_per_model
end

#soft_budgetObject

Returns the value of attribute soft_budget.



97
98
99
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 97

def soft_budget
  @soft_budget
end

#soft_budget_cooldownObject

Returns the value of attribute soft_budget_cooldown.



63
64
65
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 63

def soft_budget_cooldown
  @soft_budget_cooldown
end

#spendObject

Returns the value of attribute spend.



25
26
27
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 25

def spend
  @spend
end

#team_aliasObject

Returns the value of attribute team_alias.



85
86
87
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 85

def team_alias
  @team_alias
end

#team_blockedObject

Returns the value of attribute team_blocked.



95
96
97
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 95

def team_blocked
  @team_blocked
end

#team_idObject

Returns the value of attribute team_id.



39
40
41
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 39

def team_id
  @team_id
end

#team_max_budgetObject

Returns the value of attribute team_max_budget.



91
92
93
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 91

def team_max_budget
  @team_max_budget
end

#team_memberObject

Returns the value of attribute team_member.



103
104
105
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 103

def team_member
  @team_member
end

#team_member_spendObject

Returns the value of attribute team_member_spend.



101
102
103
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 101

def team_member_spend
  @team_member_spend
end

#team_metadataObject

Returns the value of attribute team_metadata.



105
106
107
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 105

def 
  @team_metadata
end

#team_model_aliasesObject

Returns the value of attribute team_model_aliases.



99
100
101
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 99

def team_model_aliases
  @team_model_aliases
end

#team_modelsObject

Returns the value of attribute team_models.



93
94
95
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 93

def team_models
  @team_models
end

#team_rpm_limitObject

Returns the value of attribute team_rpm_limit.



89
90
91
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 89

def team_rpm_limit
  @team_rpm_limit
end

#team_spendObject

Returns the value of attribute team_spend.



83
84
85
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 83

def team_spend
  @team_spend
end

#team_tpm_limitObject

Returns the value of attribute team_tpm_limit.



87
88
89
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 87

def team_tpm_limit
  @team_tpm_limit
end

#tokenObject

Returns the value of attribute token.



19
20
21
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 19

def token
  @token
end

#tpm_limitObject

Returns the value of attribute tpm_limit.



45
46
47
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 45

def tpm_limit
  @tpm_limit
end

#tpm_limit_per_modelObject

Returns the value of attribute tpm_limit_per_model.



127
128
129
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 127

def tpm_limit_per_model
  @tpm_limit_per_model
end

#updated_atObject

Returns the value of attribute updated_at.



75
76
77
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 75

def updated_at
  @updated_at
end

#updated_byObject

Returns the value of attribute updated_by.



77
78
79
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 77

def updated_by
  @updated_by
end

#user_emailObject

Returns the value of attribute user_email.



133
134
135
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 133

def user_email
  @user_email
end

#user_idObject

Returns the value of attribute user_id.



37
38
39
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 37

def user_id
  @user_id
end

#user_roleObject

Returns the value of attribute user_role.



119
120
121
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 119

def user_role
  @user_role
end

#user_rpm_limitObject

Returns the value of attribute user_rpm_limit.



131
132
133
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 131

def user_rpm_limit
  @user_rpm_limit
end

#user_tpm_limitObject

Returns the value of attribute user_tpm_limit.



129
130
131
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 129

def user_tpm_limit
  @user_tpm_limit
end

Class Method Details

._deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 774

def self._deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = LiteLLMClient.const_get(type)
    klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



225
226
227
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 225

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



230
231
232
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 230

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 160

def self.attribute_map
  {
    :'token' => :'token',
    :'key_name' => :'key_name',
    :'key_alias' => :'key_alias',
    :'spend' => :'spend',
    :'max_budget' => :'max_budget',
    :'expires' => :'expires',
    :'models' => :'models',
    :'aliases' => :'aliases',
    :'config' => :'config',
    :'user_id' => :'user_id',
    :'team_id' => :'team_id',
    :'max_parallel_requests' => :'max_parallel_requests',
    :'metadata' => :'metadata',
    :'tpm_limit' => :'tpm_limit',
    :'rpm_limit' => :'rpm_limit',
    :'budget_duration' => :'budget_duration',
    :'budget_reset_at' => :'budget_reset_at',
    :'allowed_cache_controls' => :'allowed_cache_controls',
    :'allowed_routes' => :'allowed_routes',
    :'permissions' => :'permissions',
    :'model_spend' => :'model_spend',
    :'model_max_budget' => :'model_max_budget',
    :'soft_budget_cooldown' => :'soft_budget_cooldown',
    :'blocked' => :'blocked',
    :'litellm_budget_table' => :'litellm_budget_table',
    :'org_id' => :'org_id',
    :'created_at' => :'created_at',
    :'created_by' => :'created_by',
    :'updated_at' => :'updated_at',
    :'updated_by' => :'updated_by',
    :'object_permission_id' => :'object_permission_id',
    :'object_permission' => :'object_permission',
    :'team_spend' => :'team_spend',
    :'team_alias' => :'team_alias',
    :'team_tpm_limit' => :'team_tpm_limit',
    :'team_rpm_limit' => :'team_rpm_limit',
    :'team_max_budget' => :'team_max_budget',
    :'team_models' => :'team_models',
    :'team_blocked' => :'team_blocked',
    :'soft_budget' => :'soft_budget',
    :'team_model_aliases' => :'team_model_aliases',
    :'team_member_spend' => :'team_member_spend',
    :'team_member' => :'team_member',
    :'team_metadata' => :'team_metadata',
    :'end_user_id' => :'end_user_id',
    :'end_user_tpm_limit' => :'end_user_tpm_limit',
    :'end_user_rpm_limit' => :'end_user_rpm_limit',
    :'end_user_max_budget' => :'end_user_max_budget',
    :'last_refreshed_at' => :'last_refreshed_at',
    :'api_key' => :'api_key',
    :'user_role' => :'user_role',
    :'allowed_model_region' => :'allowed_model_region',
    :'parent_otel_span' => :'parent_otel_span',
    :'rpm_limit_per_model' => :'rpm_limit_per_model',
    :'tpm_limit_per_model' => :'tpm_limit_per_model',
    :'user_tpm_limit' => :'user_tpm_limit',
    :'user_rpm_limit' => :'user_rpm_limit',
    :'user_email' => :'user_email',
    :'request_route' => :'request_route'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 750

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 300

def self.openapi_nullable
  Set.new([
    :'token',
    :'key_name',
    :'key_alias',
    :'max_budget',
    :'expires',
    :'user_id',
    :'team_id',
    :'max_parallel_requests',
    :'tpm_limit',
    :'rpm_limit',
    :'budget_duration',
    :'budget_reset_at',
    :'allowed_cache_controls',
    :'allowed_routes',
    :'blocked',
    :'litellm_budget_table',
    :'org_id',
    :'created_at',
    :'created_by',
    :'updated_at',
    :'updated_by',
    :'object_permission_id',
    :'object_permission',
    :'team_spend',
    :'team_alias',
    :'team_tpm_limit',
    :'team_rpm_limit',
    :'team_max_budget',
    :'soft_budget',
    :'team_model_aliases',
    :'team_member_spend',
    :'team_member',
    :'team_metadata',
    :'end_user_id',
    :'end_user_tpm_limit',
    :'end_user_rpm_limit',
    :'end_user_max_budget',
    :'last_refreshed_at',
    :'api_key',
    :'user_role',
    :'allowed_model_region',
    :'parent_otel_span',
    :'rpm_limit_per_model',
    :'tpm_limit_per_model',
    :'user_tpm_limit',
    :'user_rpm_limit',
    :'user_email',
    :'request_route'
  ])
end

.openapi_typesObject

Attribute type mapping.



235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 235

def self.openapi_types
  {
    :'token' => :'String',
    :'key_name' => :'String',
    :'key_alias' => :'String',
    :'spend' => :'Float',
    :'max_budget' => :'Float',
    :'expires' => :'Expires',
    :'models' => :'Array<Object>',
    :'aliases' => :'Hash<String, Object>',
    :'config' => :'Hash<String, Object>',
    :'user_id' => :'String',
    :'team_id' => :'String',
    :'max_parallel_requests' => :'Integer',
    :'metadata' => :'Hash<String, Object>',
    :'tpm_limit' => :'Integer',
    :'rpm_limit' => :'Integer',
    :'budget_duration' => :'String',
    :'budget_reset_at' => :'Time',
    :'allowed_cache_controls' => :'Array<Object>',
    :'allowed_routes' => :'Array<Object>',
    :'permissions' => :'Hash<String, Object>',
    :'model_spend' => :'Hash<String, Object>',
    :'model_max_budget' => :'Hash<String, Object>',
    :'soft_budget_cooldown' => :'Boolean',
    :'blocked' => :'Boolean',
    :'litellm_budget_table' => :'Hash<String, Object>',
    :'org_id' => :'String',
    :'created_at' => :'Time',
    :'created_by' => :'String',
    :'updated_at' => :'Time',
    :'updated_by' => :'String',
    :'object_permission_id' => :'String',
    :'object_permission' => :'LiteLLMObjectPermissionTable',
    :'team_spend' => :'Float',
    :'team_alias' => :'String',
    :'team_tpm_limit' => :'Integer',
    :'team_rpm_limit' => :'Integer',
    :'team_max_budget' => :'Float',
    :'team_models' => :'Array<Object>',
    :'team_blocked' => :'Boolean',
    :'soft_budget' => :'Float',
    :'team_model_aliases' => :'Hash<String, Object>',
    :'team_member_spend' => :'Float',
    :'team_member' => :'Member',
    :'team_metadata' => :'Hash<String, Object>',
    :'end_user_id' => :'String',
    :'end_user_tpm_limit' => :'Integer',
    :'end_user_rpm_limit' => :'Integer',
    :'end_user_max_budget' => :'Float',
    :'last_refreshed_at' => :'Float',
    :'api_key' => :'String',
    :'user_role' => :'LitellmUserRoles',
    :'allowed_model_region' => :'String',
    :'parent_otel_span' => :'AnyOf',
    :'rpm_limit_per_model' => :'Hash<String, Integer>',
    :'tpm_limit_per_model' => :'Hash<String, Integer>',
    :'user_tpm_limit' => :'Integer',
    :'user_rpm_limit' => :'Integer',
    :'user_email' => :'String',
    :'request_route' => :'String'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 671

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      token == o.token &&
      key_name == o.key_name &&
      key_alias == o.key_alias &&
      spend == o.spend &&
      max_budget == o.max_budget &&
      expires == o.expires &&
      models == o.models &&
      aliases == o.aliases &&
      config == o.config &&
      user_id == o.user_id &&
      team_id == o.team_id &&
      max_parallel_requests == o.max_parallel_requests &&
       == o. &&
      tpm_limit == o.tpm_limit &&
      rpm_limit == o.rpm_limit &&
      budget_duration == o.budget_duration &&
      budget_reset_at == o.budget_reset_at &&
      allowed_cache_controls == o.allowed_cache_controls &&
      allowed_routes == o.allowed_routes &&
      permissions == o.permissions &&
      model_spend == o.model_spend &&
      model_max_budget == o.model_max_budget &&
      soft_budget_cooldown == o.soft_budget_cooldown &&
      blocked == o.blocked &&
      litellm_budget_table == o.litellm_budget_table &&
      org_id == o.org_id &&
      created_at == o.created_at &&
      created_by == o.created_by &&
      updated_at == o.updated_at &&
      updated_by == o.updated_by &&
      object_permission_id == o.object_permission_id &&
      object_permission == o.object_permission &&
      team_spend == o.team_spend &&
      team_alias == o.team_alias &&
      team_tpm_limit == o.team_tpm_limit &&
      team_rpm_limit == o.team_rpm_limit &&
      team_max_budget == o.team_max_budget &&
      team_models == o.team_models &&
      team_blocked == o.team_blocked &&
      soft_budget == o.soft_budget &&
      team_model_aliases == o.team_model_aliases &&
      team_member_spend == o.team_member_spend &&
      team_member == o.team_member &&
       == o. &&
      end_user_id == o.end_user_id &&
      end_user_tpm_limit == o.end_user_tpm_limit &&
      end_user_rpm_limit == o.end_user_rpm_limit &&
      end_user_max_budget == o.end_user_max_budget &&
      last_refreshed_at == o.last_refreshed_at &&
      api_key == o.api_key &&
      user_role == o.user_role &&
      allowed_model_region == o.allowed_model_region &&
      parent_otel_span == o.parent_otel_span &&
      rpm_limit_per_model == o.rpm_limit_per_model &&
      tpm_limit_per_model == o.tpm_limit_per_model &&
      user_tpm_limit == o.user_tpm_limit &&
      user_rpm_limit == o.user_rpm_limit &&
      user_email == o.user_email &&
      request_route == o.request_route
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



845
846
847
848
849
850
851
852
853
854
855
856
857
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 845

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


737
738
739
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 737

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



743
744
745
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 743

def hash
  [token, key_name, key_alias, spend, max_budget, expires, models, aliases, config, user_id, team_id, max_parallel_requests, , tpm_limit, rpm_limit, budget_duration, budget_reset_at, allowed_cache_controls, allowed_routes, permissions, model_spend, model_max_budget, soft_budget_cooldown, blocked, litellm_budget_table, org_id, created_at, created_by, updated_at, updated_by, object_permission_id, object_permission, team_spend, team_alias, team_tpm_limit, team_rpm_limit, team_max_budget, team_models, team_blocked, soft_budget, team_model_aliases, team_member_spend, team_member, , end_user_id, end_user_tpm_limit, end_user_rpm_limit, end_user_max_budget, last_refreshed_at, api_key, user_role, allowed_model_region, parent_otel_span, rpm_limit_per_model, tpm_limit_per_model, user_tpm_limit, user_rpm_limit, user_email, request_route].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



644
645
646
647
648
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 644

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



821
822
823
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 821

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



827
828
829
830
831
832
833
834
835
836
837
838
839
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 827

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



815
816
817
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 815

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



652
653
654
655
656
657
# File 'lib/litellm_client/models/user_api_key_auth.rb', line 652

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  allowed_model_region_validator = EnumAttributeValidator.new('String', ["eu", "us"])
  return false unless allowed_model_region_validator.valid?(@allowed_model_region)
  true
end