carbon_ruby_sdk 0.2.41 → 0.2.43

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +273 -3
  4. data/lib/carbon_ruby_sdk/api/data_sources_api.rb +196 -0
  5. data/lib/carbon_ruby_sdk/api/files_api.rb +4 -4
  6. data/lib/carbon_ruby_sdk/api/integrations_api.rb +48 -16
  7. data/lib/carbon_ruby_sdk/api/users_api.rb +71 -0
  8. data/lib/carbon_ruby_sdk/api/white_label_api.rb +393 -0
  9. data/lib/carbon_ruby_sdk/models/add_data_source_tags_input.rb +234 -0
  10. data/lib/carbon_ruby_sdk/models/azure_blob_auth_request.rb +14 -4
  11. data/lib/carbon_ruby_sdk/models/cold_storage_props.rb +1 -1
  12. data/lib/carbon_ruby_sdk/models/credentials.rb +244 -0
  13. data/lib/carbon_ruby_sdk/models/delete_white_label_request.rb +222 -0
  14. data/lib/carbon_ruby_sdk/models/external_source_item.rb +11 -1
  15. data/lib/carbon_ruby_sdk/models/fresh_desk_connect_request.rb +15 -5
  16. data/lib/carbon_ruby_sdk/models/gitbook_connect_request.rb +15 -5
  17. data/lib/carbon_ruby_sdk/models/github_connect_request.rb +14 -4
  18. data/lib/carbon_ruby_sdk/models/google_drive_credentials.rb +254 -0
  19. data/lib/carbon_ruby_sdk/models/google_drive_white_label_input.rb +230 -0
  20. data/lib/carbon_ruby_sdk/models/guru_connect_request.rb +15 -5
  21. data/lib/carbon_ruby_sdk/models/list_white_label_request.rb +246 -0
  22. data/lib/carbon_ruby_sdk/models/o_auth_url_request.rb +15 -5
  23. data/lib/carbon_ruby_sdk/models/one_drive_sharepoint_credentials.rb +264 -0
  24. data/lib/carbon_ruby_sdk/models/one_drive_sharepoint_white_label_input.rb +234 -0
  25. data/lib/carbon_ruby_sdk/models/one_drive_sharepoint_white_label_input_data_source_type.rb +36 -0
  26. data/lib/carbon_ruby_sdk/models/organization_user_data_source_api.rb +15 -1
  27. data/lib/carbon_ruby_sdk/models/organization_user_data_source_filters.rb +12 -1
  28. data/lib/carbon_ruby_sdk/models/remove_data_source_tags_input.rb +242 -0
  29. data/lib/carbon_ruby_sdk/models/rss_feed_input.rb +15 -5
  30. data/lib/carbon_ruby_sdk/models/s3_auth_request.rb +15 -5
  31. data/lib/carbon_ruby_sdk/models/sync_options.rb +15 -5
  32. data/lib/carbon_ruby_sdk/models/user_response.rb +18 -4
  33. data/lib/carbon_ruby_sdk/models/white_label_create_request_inner.rb +255 -0
  34. data/lib/carbon_ruby_sdk/models/white_label_filters.rb +230 -0
  35. data/lib/carbon_ruby_sdk/models/white_label_input.rb +234 -0
  36. data/lib/carbon_ruby_sdk/models/white_label_input_data_source_type.rb +48 -0
  37. data/lib/carbon_ruby_sdk/models/white_label_order_by_columns.rb +36 -0
  38. data/lib/carbon_ruby_sdk/models/white_label_update_request.rb +255 -0
  39. data/lib/carbon_ruby_sdk/models/white_labeling_response.rb +18 -4
  40. data/lib/carbon_ruby_sdk/version.rb +1 -1
  41. data/lib/carbon_ruby_sdk.rb +19 -0
  42. data/spec/api/data_sources_api_spec.rb +22 -0
  43. data/spec/api/files_api_spec.rb +1 -1
  44. data/spec/api/users_api_spec.rb +10 -0
  45. data/spec/api/white_label_api_spec.rb +73 -0
  46. data/spec/models/add_data_source_tags_input_spec.rb +34 -0
  47. data/spec/models/azure_blob_auth_request_spec.rb +6 -0
  48. data/spec/models/credentials_spec.rb +40 -0
  49. data/spec/models/delete_white_label_request_spec.rb +28 -0
  50. data/spec/models/external_source_item_spec.rb +6 -0
  51. data/spec/models/fresh_desk_connect_request_spec.rb +6 -0
  52. data/spec/models/gitbook_connect_request_spec.rb +6 -0
  53. data/spec/models/github_connect_request_spec.rb +6 -0
  54. data/spec/models/google_drive_credentials_spec.rb +46 -0
  55. data/spec/models/google_drive_white_label_input_spec.rb +34 -0
  56. data/spec/models/guru_connect_request_spec.rb +6 -0
  57. data/spec/models/list_white_label_request_spec.rb +46 -0
  58. data/spec/models/o_auth_url_request_spec.rb +6 -0
  59. data/spec/models/one_drive_sharepoint_credentials_spec.rb +52 -0
  60. data/spec/models/one_drive_sharepoint_white_label_input_data_source_type_spec.rb +22 -0
  61. data/spec/models/one_drive_sharepoint_white_label_input_spec.rb +34 -0
  62. data/spec/models/organization_user_data_source_api_spec.rb +6 -0
  63. data/spec/models/organization_user_data_source_filters_spec.rb +6 -0
  64. data/spec/models/remove_data_source_tags_input_spec.rb +40 -0
  65. data/spec/models/rss_feed_input_spec.rb +6 -0
  66. data/spec/models/s3_auth_request_spec.rb +6 -0
  67. data/spec/models/sync_options_spec.rb +6 -0
  68. data/spec/models/user_response_spec.rb +6 -0
  69. data/spec/models/white_label_create_request_inner_spec.rb +34 -0
  70. data/spec/models/white_label_filters_spec.rb +34 -0
  71. data/spec/models/white_label_input_data_source_type_spec.rb +22 -0
  72. data/spec/models/white_label_input_spec.rb +34 -0
  73. data/spec/models/white_label_order_by_columns_spec.rb +22 -0
  74. data/spec/models/white_label_update_request_spec.rb +34 -0
  75. data/spec/models/white_labeling_response_spec.rb +6 -0
  76. metadata +53 -2
@@ -0,0 +1,230 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class WhiteLabelFilters
14
+ attr_accessor :ids
15
+
16
+ attr_accessor :data_source_type
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'ids' => :'ids',
22
+ :'data_source_type' => :'data_source_type'
23
+ }
24
+ end
25
+
26
+ # Returns all the JSON keys this model knows about
27
+ def self.acceptable_attributes
28
+ attribute_map.values
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'ids' => :'Array<Integer>',
35
+ :'data_source_type' => :'Array<OauthBasedConnectors>'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ :'ids',
43
+ :'data_source_type'
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::WhiteLabelFilters` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::WhiteLabelFilters`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'ids')
63
+ if (value = attributes[:'ids']).is_a?(Array)
64
+ self.ids = value
65
+ end
66
+ end
67
+
68
+ if attributes.key?(:'data_source_type')
69
+ if (value = attributes[:'data_source_type']).is_a?(Array)
70
+ self.data_source_type = value
71
+ end
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ invalid_properties
80
+ end
81
+
82
+ # Check to see if the all the properties in the model are valid
83
+ # @return true if the model is valid
84
+ def valid?
85
+ true
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] Object to be compared
90
+ def ==(o)
91
+ return true if self.equal?(o)
92
+ self.class == o.class &&
93
+ ids == o.ids &&
94
+ data_source_type == o.data_source_type
95
+ end
96
+
97
+ # @see the `==` method
98
+ # @param [Object] Object to be compared
99
+ def eql?(o)
100
+ self == o
101
+ end
102
+
103
+ # Calculates hash code according to all attributes.
104
+ # @return [Integer] Hash code
105
+ def hash
106
+ [ids, data_source_type].hash
107
+ end
108
+
109
+ # Builds the object from hash
110
+ # @param [Hash] attributes Model attributes in the form of hash
111
+ # @return [Object] Returns the model itself
112
+ def self.build_from_hash(attributes)
113
+ new.build_from_hash(attributes)
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ attributes = attributes.transform_keys(&:to_sym)
122
+ self.class.openapi_types.each_pair do |key, type|
123
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
124
+ self.send("#{key}=", nil)
125
+ elsif type =~ /\AArray<(.*)>/i
126
+ # check to ensure the input is an array given that the attribute
127
+ # is documented as an array but the input is not
128
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
129
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
130
+ end
131
+ elsif !attributes[self.class.attribute_map[key]].nil?
132
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
133
+ end
134
+ end
135
+
136
+ self
137
+ end
138
+
139
+ # Deserializes the data based on type
140
+ # @param string type Data type
141
+ # @param string value Value to be deserialized
142
+ # @return [Object] Deserialized data
143
+ def _deserialize(type, value)
144
+ case type.to_sym
145
+ when :Time
146
+ Time.parse(value)
147
+ when :Date
148
+ Date.parse(value)
149
+ when :String
150
+ value.to_s
151
+ when :Integer
152
+ value.to_i
153
+ when :Float
154
+ value.to_f
155
+ when :Boolean
156
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
157
+ true
158
+ else
159
+ false
160
+ end
161
+ when :Object
162
+ # generic object (usually a Hash), return directly
163
+ value
164
+ when /\AArray<(?<inner_type>.+)>\z/
165
+ inner_type = Regexp.last_match[:inner_type]
166
+ value.map { |v| _deserialize(inner_type, v) }
167
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
168
+ k_type = Regexp.last_match[:k_type]
169
+ v_type = Regexp.last_match[:v_type]
170
+ {}.tap do |hash|
171
+ value.each do |k, v|
172
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
173
+ end
174
+ end
175
+ else # model
176
+ # models (e.g. Pet) or oneOf
177
+ klass = Carbon.const_get(type)
178
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
179
+ end
180
+ end
181
+
182
+ # Returns the string representation of the object
183
+ # @return [String] String presentation of the object
184
+ def to_s
185
+ to_hash.to_s
186
+ end
187
+
188
+ # to_body is an alias to to_hash (backward compatibility)
189
+ # @return [Hash] Returns the object in the form of hash
190
+ def to_body
191
+ to_hash
192
+ end
193
+
194
+ # Returns the object in the form of hash
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_hash
197
+ hash = {}
198
+ self.class.attribute_map.each_pair do |attr, param|
199
+ value = self.send(attr)
200
+ if value.nil?
201
+ is_nullable = self.class.openapi_nullable.include?(attr)
202
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
203
+ end
204
+
205
+ hash[param] = _to_hash(value)
206
+ end
207
+ hash
208
+ end
209
+
210
+ # Outputs non-array value in the form of hash
211
+ # For object, use to_hash. Otherwise, just return the value
212
+ # @param [Object] value Any valid value
213
+ # @return [Hash] Returns the value in the form of hash
214
+ def _to_hash(value)
215
+ if value.is_a?(Array)
216
+ value.compact.map { |v| _to_hash(v) }
217
+ elsif value.is_a?(Hash)
218
+ {}.tap do |hash|
219
+ value.each { |k, v| hash[k] = _to_hash(v) }
220
+ end
221
+ elsif value.respond_to? :to_hash
222
+ value.to_hash
223
+ else
224
+ value
225
+ end
226
+ end
227
+
228
+ end
229
+
230
+ end
@@ -0,0 +1,234 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class WhiteLabelInput
14
+ attr_accessor :data_source_type
15
+
16
+ attr_accessor :credentials
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'data_source_type' => :'data_source_type',
22
+ :'credentials' => :'credentials'
23
+ }
24
+ end
25
+
26
+ # Returns all the JSON keys this model knows about
27
+ def self.acceptable_attributes
28
+ attribute_map.values
29
+ end
30
+
31
+ # Attribute type mapping.
32
+ def self.openapi_types
33
+ {
34
+ :'data_source_type' => :'WhiteLabelInputDataSourceType',
35
+ :'credentials' => :'Credentials'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.openapi_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Carbon::WhiteLabelInput` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Carbon::WhiteLabelInput`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'data_source_type')
61
+ self.data_source_type = attributes[:'data_source_type']
62
+ end
63
+
64
+ if attributes.key?(:'credentials')
65
+ self.credentials = attributes[:'credentials']
66
+ end
67
+ end
68
+
69
+ # Show invalid properties with the reasons. Usually used together with valid?
70
+ # @return Array for valid properties with the reasons
71
+ def list_invalid_properties
72
+ invalid_properties = Array.new
73
+ if @data_source_type.nil?
74
+ invalid_properties.push('invalid value for "data_source_type", data_source_type cannot be nil.')
75
+ end
76
+
77
+ if @credentials.nil?
78
+ invalid_properties.push('invalid value for "credentials", credentials cannot be nil.')
79
+ end
80
+
81
+ invalid_properties
82
+ end
83
+
84
+ # Check to see if the all the properties in the model are valid
85
+ # @return true if the model is valid
86
+ def valid?
87
+ return false if @data_source_type.nil?
88
+ return false if @credentials.nil?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ data_source_type == o.data_source_type &&
98
+ credentials == o.credentials
99
+ end
100
+
101
+ # @see the `==` method
102
+ # @param [Object] Object to be compared
103
+ def eql?(o)
104
+ self == o
105
+ end
106
+
107
+ # Calculates hash code according to all attributes.
108
+ # @return [Integer] Hash code
109
+ def hash
110
+ [data_source_type, credentials].hash
111
+ end
112
+
113
+ # Builds the object from hash
114
+ # @param [Hash] attributes Model attributes in the form of hash
115
+ # @return [Object] Returns the model itself
116
+ def self.build_from_hash(attributes)
117
+ new.build_from_hash(attributes)
118
+ end
119
+
120
+ # Builds the object from hash
121
+ # @param [Hash] attributes Model attributes in the form of hash
122
+ # @return [Object] Returns the model itself
123
+ def build_from_hash(attributes)
124
+ return nil unless attributes.is_a?(Hash)
125
+ attributes = attributes.transform_keys(&:to_sym)
126
+ self.class.openapi_types.each_pair do |key, type|
127
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
128
+ self.send("#{key}=", nil)
129
+ elsif type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
133
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ end
135
+ elsif !attributes[self.class.attribute_map[key]].nil?
136
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ end
138
+ end
139
+
140
+ self
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def _deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = Carbon.const_get(type)
182
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.openapi_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class WhiteLabelInputDataSourceType
14
+ INTERCOM = "INTERCOM".freeze
15
+ NOTION = "NOTION".freeze
16
+ SLACK = "SLACK".freeze
17
+ ZENDESK = "ZENDESK".freeze
18
+ OUTLOOK = "OUTLOOK".freeze
19
+ GMAIL = "GMAIL".freeze
20
+ SERVICENOW = "SERVICENOW".freeze
21
+ SALESFORCE = "SALESFORCE".freeze
22
+ ZOTERO = "ZOTERO".freeze
23
+ BOX = "BOX".freeze
24
+ CONFLUENCE = "CONFLUENCE".freeze
25
+ DROPBOX = "DROPBOX".freeze
26
+ GOOGLE_CLOUD_STORAGE = "GOOGLE_CLOUD_STORAGE".freeze
27
+ GONG = "GONG".freeze
28
+
29
+ def self.all_vars
30
+ @all_vars ||= [INTERCOM, NOTION, SLACK, ZENDESK, OUTLOOK, GMAIL, SERVICENOW, SALESFORCE, ZOTERO, BOX, CONFLUENCE, DROPBOX, GOOGLE_CLOUD_STORAGE, GONG].freeze
31
+ end
32
+
33
+ # Builds the enum from string
34
+ # @param [String] The enum value in the form of the string
35
+ # @return [String] The enum value
36
+ def self.build_from_hash(value)
37
+ new.build_from_hash(value)
38
+ end
39
+
40
+ # Builds the enum from string
41
+ # @param [String] The enum value in the form of the string
42
+ # @return [String] The enum value
43
+ def build_from_hash(value)
44
+ return value if WhiteLabelInputDataSourceType.all_vars.include?(value)
45
+ raise "Invalid ENUM value #{value} for class #WhiteLabelInputDataSourceType"
46
+ end
47
+ end
48
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Carbon
3
+
4
+ #Connect external data to LLMs, no matter the source.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ =end
8
+
9
+ require 'date'
10
+ require 'time'
11
+
12
+ module Carbon
13
+ class WhiteLabelOrderByColumns
14
+ CREATED_AT = "created_at".freeze
15
+ DATA_SOURCE_TYPE = "data_source_type".freeze
16
+
17
+ def self.all_vars
18
+ @all_vars ||= [CREATED_AT, DATA_SOURCE_TYPE].freeze
19
+ end
20
+
21
+ # Builds the enum from string
22
+ # @param [String] The enum value in the form of the string
23
+ # @return [String] The enum value
24
+ def self.build_from_hash(value)
25
+ new.build_from_hash(value)
26
+ end
27
+
28
+ # Builds the enum from string
29
+ # @param [String] The enum value in the form of the string
30
+ # @return [String] The enum value
31
+ def build_from_hash(value)
32
+ return value if WhiteLabelOrderByColumns.all_vars.include?(value)
33
+ raise "Invalid ENUM value #{value} for class #WhiteLabelOrderByColumns"
34
+ end
35
+ end
36
+ end