ragie_ruby_sdk 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,243 @@
1
+ =begin
2
+ #Ragie API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module RagieRubySdk
17
+ class UpdatePartitionParams
18
+ attr_accessor :context_aware
19
+
20
+ attr_accessor :description
21
+
22
+ attr_accessor :metadata_schema
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'context_aware' => :'context_aware',
28
+ :'description' => :'description',
29
+ :'metadata_schema' => :'metadata_schema'
30
+ }
31
+ end
32
+
33
+ # Returns attribute mapping this model knows about
34
+ def self.acceptable_attribute_map
35
+ attribute_map
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ acceptable_attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.openapi_types
45
+ {
46
+ :'context_aware' => :'Boolean',
47
+ :'description' => :'String',
48
+ :'metadata_schema' => :'Hash<String, CreatePartitionParamsMetadataSchemaValue>'
49
+ }
50
+ end
51
+
52
+ # List of attributes with nullable: true
53
+ def self.openapi_nullable
54
+ Set.new([
55
+ :'context_aware',
56
+ :'description',
57
+ :'metadata_schema'
58
+ ])
59
+ end
60
+
61
+ # Initializes the object
62
+ # @param [Hash] attributes Model attributes in the form of hash
63
+ def initialize(attributes = {})
64
+ if (!attributes.is_a?(Hash))
65
+ fail ArgumentError, "The input argument (attributes) must be a hash in `RagieRubySdk::UpdatePartitionParams` initialize method"
66
+ end
67
+
68
+ # check to see if the attribute exists and convert string to symbol for hash key
69
+ acceptable_attribute_map = self.class.acceptable_attribute_map
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!acceptable_attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `RagieRubySdk::UpdatePartitionParams`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'context_aware')
78
+ self.context_aware = attributes[:'context_aware']
79
+ end
80
+
81
+ if attributes.key?(:'description')
82
+ self.description = attributes[:'description']
83
+ end
84
+
85
+ if attributes.key?(:'metadata_schema')
86
+ if (value = attributes[:'metadata_schema']).is_a?(Hash)
87
+ self.metadata_schema = value
88
+ end
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ warn '[DEPRECATED] the `valid?` method is obsolete'
104
+ true
105
+ end
106
+
107
+ # Checks equality by comparing each attribute.
108
+ # @param [Object] Object to be compared
109
+ def ==(o)
110
+ return true if self.equal?(o)
111
+ self.class == o.class &&
112
+ context_aware == o.context_aware &&
113
+ description == o.description &&
114
+ metadata_schema == o.metadata_schema
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [context_aware, description, metadata_schema].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ return nil unless attributes.is_a?(Hash)
134
+ attributes = attributes.transform_keys(&:to_sym)
135
+ transformed_hash = {}
136
+ openapi_types.each_pair do |key, type|
137
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
138
+ transformed_hash["#{key}"] = nil
139
+ elsif type =~ /\AArray<(.*)>/i
140
+ # check to ensure the input is an array given that the attribute
141
+ # is documented as an array but the input is not
142
+ if attributes[attribute_map[key]].is_a?(Array)
143
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
144
+ end
145
+ elsif !attributes[attribute_map[key]].nil?
146
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
147
+ end
148
+ end
149
+ new(transformed_hash)
150
+ end
151
+
152
+ # Deserializes the data based on type
153
+ # @param string type Data type
154
+ # @param string value Value to be deserialized
155
+ # @return [Object] Deserialized data
156
+ def self._deserialize(type, value)
157
+ case type.to_sym
158
+ when :Time
159
+ Time.parse(value)
160
+ when :Date
161
+ Date.parse(value)
162
+ when :String
163
+ value.to_s
164
+ when :Integer
165
+ value.to_i
166
+ when :Float
167
+ value.to_f
168
+ when :Boolean
169
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
170
+ true
171
+ else
172
+ false
173
+ end
174
+ when :Object
175
+ # generic object (usually a Hash), return directly
176
+ value
177
+ when /\AArray<(?<inner_type>.+)>\z/
178
+ inner_type = Regexp.last_match[:inner_type]
179
+ value.map { |v| _deserialize(inner_type, v) }
180
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
181
+ k_type = Regexp.last_match[:k_type]
182
+ v_type = Regexp.last_match[:v_type]
183
+ {}.tap do |hash|
184
+ value.each do |k, v|
185
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
186
+ end
187
+ end
188
+ else # model
189
+ # models (e.g. Pet) or oneOf
190
+ klass = RagieRubySdk.const_get(type)
191
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
192
+ end
193
+ end
194
+
195
+ # Returns the string representation of the object
196
+ # @return [String] String presentation of the object
197
+ def to_s
198
+ to_hash.to_s
199
+ end
200
+
201
+ # to_body is an alias to to_hash (backward compatibility)
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_body
204
+ to_hash
205
+ end
206
+
207
+ # Returns the object in the form of hash
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_hash
210
+ hash = {}
211
+ self.class.attribute_map.each_pair do |attr, param|
212
+ value = self.send(attr)
213
+ if value.nil?
214
+ is_nullable = self.class.openapi_nullable.include?(attr)
215
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
216
+ end
217
+
218
+ hash[param] = _to_hash(value)
219
+ end
220
+ hash
221
+ end
222
+
223
+ # Outputs non-array value in the form of hash
224
+ # For object, use to_hash. Otherwise, just return the value
225
+ # @param [Object] value Any valid value
226
+ # @return [Hash] Returns the value in the form of hash
227
+ def _to_hash(value)
228
+ if value.is_a?(Array)
229
+ value.compact.map { |v| _to_hash(v) }
230
+ elsif value.is_a?(Hash)
231
+ {}.tap do |hash|
232
+ value.each { |k, v| hash[k] = _to_hash(v) }
233
+ end
234
+ elsif value.respond_to? :to_hash
235
+ value.to_hash
236
+ else
237
+ value
238
+ end
239
+ end
240
+
241
+ end
242
+
243
+ end
@@ -11,5 +11,5 @@ Generator version: 7.17.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module RagieRubySdk
14
- VERSION = '1.0.20'
14
+ VERSION = '1.0.22'
15
15
  end
@@ -185,6 +185,7 @@ require 'ragie_ruby_sdk/models/tool'
185
185
  require 'ragie_ruby_sdk/models/update_document_from_url_params'
186
186
  require 'ragie_ruby_sdk/models/update_document_raw_params'
187
187
  require 'ragie_ruby_sdk/models/update_instruction_params'
188
+ require 'ragie_ruby_sdk/models/update_partition_params'
188
189
  require 'ragie_ruby_sdk/models/validation_error'
189
190
  require 'ragie_ruby_sdk/models/validation_error_loc_inner'
190
191
  require 'ragie_ruby_sdk/models/video_modality_data'
@@ -81,30 +81,6 @@ describe 'BetaApi' do
81
81
  end
82
82
  end
83
83
 
84
- # unit tests for disable_mcp_partitions_partition_id_mcp_delete
85
- # Disable Mcp
86
- # Disables context-aware descriptions for a partition. This will stop automatically generating descriptions for the partition.
87
- # @param partition_id
88
- # @param [Hash] opts the optional parameters
89
- # @return [Object]
90
- describe 'disable_mcp_partitions_partition_id_mcp_delete test' do
91
- it 'should work' do
92
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
93
- end
94
- end
95
-
96
- # unit tests for enable_mcp_partitions_partition_id_mcp_post
97
- # Enable Mcp
98
- # Enables context-aware descriptions for a partition. This will allow the automatically generate a desccription for based on the documents in the partition.
99
- # @param partition_id
100
- # @param [Hash] opts the optional parameters
101
- # @return [Object]
102
- describe 'enable_mcp_partitions_partition_id_mcp_post test' do
103
- it 'should work' do
104
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
105
- end
106
- end
107
-
108
84
  # unit tests for list_authenticators
109
85
  # List Authenticators
110
86
  # List all authenticators sorted by created_at in descending order. Results are paginated with a max limit of 100. When more authenticators are available, a &#x60;cursor&#x60; will be provided. Use the &#x60;cursor&#x60; parameter to retrieve the subsequent page.
@@ -56,30 +56,6 @@ describe 'PartitionsApi' do
56
56
  end
57
57
  end
58
58
 
59
- # unit tests for disable_mcp_partitions_partition_id_mcp_delete
60
- # Disable Mcp
61
- # Disables context-aware descriptions for a partition. This will stop automatically generating descriptions for the partition.
62
- # @param partition_id
63
- # @param [Hash] opts the optional parameters
64
- # @return [Object]
65
- describe 'disable_mcp_partitions_partition_id_mcp_delete test' do
66
- it 'should work' do
67
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
68
- end
69
- end
70
-
71
- # unit tests for enable_mcp_partitions_partition_id_mcp_post
72
- # Enable Mcp
73
- # Enables context-aware descriptions for a partition. This will allow the automatically generate a desccription for based on the documents in the partition.
74
- # @param partition_id
75
- # @param [Hash] opts the optional parameters
76
- # @return [Object]
77
- describe 'enable_mcp_partitions_partition_id_mcp_post test' do
78
- it 'should work' do
79
- # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
80
- end
81
- end
82
-
83
59
  # unit tests for get_partition_partitions_partition_id_get
84
60
  # Get Partition
85
61
  # Get a partition by its ID. Includes usage information such as the number of documents and pages hosted and processed. The partition&#39;s limits are also included.
@@ -118,4 +94,17 @@ describe 'PartitionsApi' do
118
94
  end
119
95
  end
120
96
 
97
+ # unit tests for update_partition_partitions_partition_id_patch
98
+ # Update Partition
99
+ # Updates a partition. This includes the partition&#39;s description and metadata schema.
100
+ # @param partition_id
101
+ # @param update_partition_params
102
+ # @param [Hash] opts the optional parameters
103
+ # @return [PartitionDetail]
104
+ describe 'update_partition_partitions_partition_id_patch test' do
105
+ it 'should work' do
106
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
107
+ end
108
+ end
109
+
121
110
  end
@@ -33,6 +33,12 @@ describe RagieRubySdk::CreatePartitionParams do
33
33
  end
34
34
  end
35
35
 
36
+ describe 'test attribute "description"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
36
42
  describe 'test attribute "pages_hosted_limit_monthly"' do
37
43
  it 'should work' do
38
44
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -45,6 +45,24 @@ describe RagieRubySdk::PartitionDetail do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "description"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "context_aware"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "metadata_schema"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
48
66
  describe 'test attribute "limits"' do
49
67
  it 'should work' do
50
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -45,6 +45,24 @@ describe RagieRubySdk::Partition do
45
45
  end
46
46
  end
47
47
 
48
+ describe 'test attribute "description"' do
49
+ it 'should work' do
50
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
51
+ end
52
+ end
53
+
54
+ describe 'test attribute "context_aware"' do
55
+ it 'should work' do
56
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
57
+ end
58
+ end
59
+
60
+ describe 'test attribute "metadata_schema"' do
61
+ it 'should work' do
62
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
63
+ end
64
+ end
65
+
48
66
  describe 'test attribute "limits"' do
49
67
  it 'should work' do
50
68
  # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
@@ -0,0 +1,48 @@
1
+ =begin
2
+ #Ragie API
3
+
4
+ #No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.17.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for RagieRubySdk::UpdatePartitionParams
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe RagieRubySdk::UpdatePartitionParams do
21
+ #let(:instance) { RagieRubySdk::UpdatePartitionParams.new }
22
+
23
+ describe 'test an instance of UpdatePartitionParams' do
24
+ it 'should create an instance of UpdatePartitionParams' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(RagieRubySdk::UpdatePartitionParams)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "context_aware"' do
31
+ it 'should work' do
32
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
33
+ end
34
+ end
35
+
36
+ describe 'test attribute "description"' do
37
+ it 'should work' do
38
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
39
+ end
40
+ end
41
+
42
+ describe 'test attribute "metadata_schema"' do
43
+ it 'should work' do
44
+ # assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
45
+ end
46
+ end
47
+
48
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ragie_ruby_sdk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.20
4
+ version: 1.0.22
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
@@ -265,6 +265,7 @@ files:
265
265
  - docs/UpdateDocumentFromUrlParams.md
266
266
  - docs/UpdateDocumentRawParams.md
267
267
  - docs/UpdateInstructionParams.md
268
+ - docs/UpdatePartitionParams.md
268
269
  - docs/ValidationError.md
269
270
  - docs/ValidationErrorLocInner.md
270
271
  - docs/VideoModalityData.md
@@ -454,6 +455,7 @@ files:
454
455
  - lib/ragie_ruby_sdk/models/update_document_from_url_params.rb
455
456
  - lib/ragie_ruby_sdk/models/update_document_raw_params.rb
456
457
  - lib/ragie_ruby_sdk/models/update_instruction_params.rb
458
+ - lib/ragie_ruby_sdk/models/update_partition_params.rb
457
459
  - lib/ragie_ruby_sdk/models/validation_error.rb
458
460
  - lib/ragie_ruby_sdk/models/validation_error_loc_inner.rb
459
461
  - lib/ragie_ruby_sdk/models/video_modality_data.rb
@@ -640,6 +642,7 @@ files:
640
642
  - spec/models/update_document_from_url_params_spec.rb
641
643
  - spec/models/update_document_raw_params_spec.rb
642
644
  - spec/models/update_instruction_params_spec.rb
645
+ - spec/models/update_partition_params_spec.rb
643
646
  - spec/models/validation_error_loc_inner_spec.rb
644
647
  - spec/models/validation_error_spec.rb
645
648
  - spec/models/video_modality_data_spec.rb
@@ -847,6 +850,7 @@ test_files:
847
850
  - spec/models/update_document_from_url_params_spec.rb
848
851
  - spec/models/update_document_raw_params_spec.rb
849
852
  - spec/models/update_instruction_params_spec.rb
853
+ - spec/models/update_partition_params_spec.rb
850
854
  - spec/models/validation_error_loc_inner_spec.rb
851
855
  - spec/models/validation_error_spec.rb
852
856
  - spec/models/video_modality_data_spec.rb