cheminee 0.1.5 → 0.1.6

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,223 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module Cheminee
17
+ class PostIndexBulkResponseOkStatus
18
+ attr_accessor :opcode
19
+
20
+ attr_accessor :error
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'opcode' => :'opcode',
26
+ :'error' => :'error'
27
+ }
28
+ end
29
+
30
+ # Returns all the JSON keys this model knows about
31
+ def self.acceptable_attributes
32
+ attribute_map.values
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.openapi_types
37
+ {
38
+ :'opcode' => :'Integer',
39
+ :'error' => :'String'
40
+ }
41
+ end
42
+
43
+ # List of attributes with nullable: true
44
+ def self.openapi_nullable
45
+ Set.new([
46
+ ])
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ if (!attributes.is_a?(Hash))
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Cheminee::PostIndexBulkResponseOkStatus` initialize method"
54
+ end
55
+
56
+ # check to see if the attribute exists and convert string to symbol for hash key
57
+ attributes = attributes.each_with_object({}) { |(k, v), h|
58
+ if (!self.class.attribute_map.key?(k.to_sym))
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Cheminee::PostIndexBulkResponseOkStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
+ end
61
+ h[k.to_sym] = v
62
+ }
63
+
64
+ if attributes.key?(:'opcode')
65
+ self.opcode = attributes[:'opcode']
66
+ end
67
+
68
+ if attributes.key?(:'error')
69
+ self.error = attributes[:'error']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ invalid_properties
79
+ end
80
+
81
+ # Check to see if the all the properties in the model are valid
82
+ # @return true if the model is valid
83
+ def valid?
84
+ warn '[DEPRECATED] the `valid?` method is obsolete'
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
+ opcode == o.opcode &&
94
+ error == o.error
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
+ [opcode, error].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
+ return nil unless attributes.is_a?(Hash)
114
+ attributes = attributes.transform_keys(&:to_sym)
115
+ transformed_hash = {}
116
+ openapi_types.each_pair do |key, type|
117
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
118
+ transformed_hash["#{key}"] = nil
119
+ elsif type =~ /\AArray<(.*)>/i
120
+ # check to ensure the input is an array given that the attribute
121
+ # is documented as an array but the input is not
122
+ if attributes[attribute_map[key]].is_a?(Array)
123
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
124
+ end
125
+ elsif !attributes[attribute_map[key]].nil?
126
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
127
+ end
128
+ end
129
+ new(transformed_hash)
130
+ end
131
+
132
+ # Deserializes the data based on type
133
+ # @param string type Data type
134
+ # @param string value Value to be deserialized
135
+ # @return [Object] Deserialized data
136
+ def self._deserialize(type, value)
137
+ case type.to_sym
138
+ when :Time
139
+ Time.parse(value)
140
+ when :Date
141
+ Date.parse(value)
142
+ when :String
143
+ value.to_s
144
+ when :Integer
145
+ value.to_i
146
+ when :Float
147
+ value.to_f
148
+ when :Boolean
149
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
150
+ true
151
+ else
152
+ false
153
+ end
154
+ when :Object
155
+ # generic object (usually a Hash), return directly
156
+ value
157
+ when /\AArray<(?<inner_type>.+)>\z/
158
+ inner_type = Regexp.last_match[:inner_type]
159
+ value.map { |v| _deserialize(inner_type, v) }
160
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
161
+ k_type = Regexp.last_match[:k_type]
162
+ v_type = Regexp.last_match[:v_type]
163
+ {}.tap do |hash|
164
+ value.each do |k, v|
165
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
166
+ end
167
+ end
168
+ else # model
169
+ # models (e.g. Pet) or oneOf
170
+ klass = Cheminee.const_get(type)
171
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
172
+ end
173
+ end
174
+
175
+ # Returns the string representation of the object
176
+ # @return [String] String presentation of the object
177
+ def to_s
178
+ to_hash.to_s
179
+ end
180
+
181
+ # to_body is an alias to to_hash (backward compatibility)
182
+ # @return [Hash] Returns the object in the form of hash
183
+ def to_body
184
+ to_hash
185
+ end
186
+
187
+ # Returns the object in the form of hash
188
+ # @return [Hash] Returns the object in the form of hash
189
+ def to_hash
190
+ hash = {}
191
+ self.class.attribute_map.each_pair do |attr, param|
192
+ value = self.send(attr)
193
+ if value.nil?
194
+ is_nullable = self.class.openapi_nullable.include?(attr)
195
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
196
+ end
197
+
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+
221
+ end
222
+
223
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 7.1.0-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module Cheminee
14
- VERSION = '0.1.5'
14
+ VERSION = '0.1.6'
15
15
  end
data/lib/cheminee.rb CHANGED
@@ -17,10 +17,15 @@ require 'cheminee/version'
17
17
  require 'cheminee/configuration'
18
18
 
19
19
  # Models
20
+ require 'cheminee/models/bulk_request'
21
+ require 'cheminee/models/bulk_request_doc'
20
22
  require 'cheminee/models/create_index_error'
21
23
  require 'cheminee/models/get_indexes_response_error'
22
24
  require 'cheminee/models/index_meta'
23
25
  require 'cheminee/models/list_index_response_err'
26
+ require 'cheminee/models/post_index_bulk_response_error'
27
+ require 'cheminee/models/post_index_bulk_response_ok'
28
+ require 'cheminee/models/post_index_bulk_response_ok_status'
24
29
  require 'cheminee/models/schema'
25
30
  require 'cheminee/models/smile'
26
31
  require 'cheminee/models/standardized_smile'
Binary file
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Cheminee::BulkRequestDoc
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Cheminee::BulkRequestDoc do
21
+ let(:instance) { Cheminee::BulkRequestDoc.new }
22
+
23
+ describe 'test an instance of BulkRequestDoc' do
24
+ it 'should create an instance of BulkRequestDoc' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Cheminee::BulkRequestDoc)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "smile"' 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 "extra_data"' 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
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Cheminee::BulkRequest
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Cheminee::BulkRequest do
21
+ let(:instance) { Cheminee::BulkRequest.new }
22
+
23
+ describe 'test an instance of BulkRequest' do
24
+ it 'should create an instance of BulkRequest' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Cheminee::BulkRequest)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "docs"' 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
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Cheminee::PostIndexBulkResponseError
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Cheminee::PostIndexBulkResponseError do
21
+ let(:instance) { Cheminee::PostIndexBulkResponseError.new }
22
+
23
+ describe 'test an instance of PostIndexBulkResponseError' do
24
+ it 'should create an instance of PostIndexBulkResponseError' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Cheminee::PostIndexBulkResponseError)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "error"' 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
+ end
@@ -0,0 +1,36 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Cheminee::PostIndexBulkResponseOk
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Cheminee::PostIndexBulkResponseOk do
21
+ let(:instance) { Cheminee::PostIndexBulkResponseOk.new }
22
+
23
+ describe 'test an instance of PostIndexBulkResponseOk' do
24
+ it 'should create an instance of PostIndexBulkResponseOk' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Cheminee::PostIndexBulkResponseOk)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "statuses"' 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
+ end
@@ -0,0 +1,42 @@
1
+ =begin
2
+ #Cheminée
3
+
4
+ #Cheminée: The Chemical Structure Search Engine
5
+
6
+ The version of the OpenAPI document: 1.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.1.0-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for Cheminee::PostIndexBulkResponseOkStatus
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe Cheminee::PostIndexBulkResponseOkStatus do
21
+ let(:instance) { Cheminee::PostIndexBulkResponseOkStatus.new }
22
+
23
+ describe 'test an instance of PostIndexBulkResponseOkStatus' do
24
+ it 'should create an instance of PostIndexBulkResponseOkStatus' do
25
+ # uncomment below to test the instance creation
26
+ #expect(instance).to be_instance_of(Cheminee::PostIndexBulkResponseOkStatus)
27
+ end
28
+ end
29
+
30
+ describe 'test attribute "opcode"' 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 "error"' 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
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cheminee
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Xavier Lange
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-17 00:00:00.000000000 Z
11
+ date: 2023-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -62,11 +62,16 @@ files:
62
62
  - README.md
63
63
  - Rakefile
64
64
  - cheminee.gemspec
65
+ - docs/BulkRequest.md
66
+ - docs/BulkRequestDoc.md
65
67
  - docs/CreateIndexError.md
66
68
  - docs/DefaultApi.md
67
69
  - docs/GetIndexesResponseError.md
68
70
  - docs/IndexMeta.md
69
71
  - docs/ListIndexResponseErr.md
72
+ - docs/PostIndexBulkResponseError.md
73
+ - docs/PostIndexBulkResponseOk.md
74
+ - docs/PostIndexBulkResponseOkStatus.md
70
75
  - docs/Schema.md
71
76
  - docs/Smile.md
72
77
  - docs/StandardizedSmile.md
@@ -77,10 +82,15 @@ files:
77
82
  - lib/cheminee/api_client.rb
78
83
  - lib/cheminee/api_error.rb
79
84
  - lib/cheminee/configuration.rb
85
+ - lib/cheminee/models/bulk_request.rb
86
+ - lib/cheminee/models/bulk_request_doc.rb
80
87
  - lib/cheminee/models/create_index_error.rb
81
88
  - lib/cheminee/models/get_indexes_response_error.rb
82
89
  - lib/cheminee/models/index_meta.rb
83
90
  - lib/cheminee/models/list_index_response_err.rb
91
+ - lib/cheminee/models/post_index_bulk_response_error.rb
92
+ - lib/cheminee/models/post_index_bulk_response_ok.rb
93
+ - lib/cheminee/models/post_index_bulk_response_ok_status.rb
84
94
  - lib/cheminee/models/schema.rb
85
95
  - lib/cheminee/models/smile.rb
86
96
  - lib/cheminee/models/standardized_smile.rb
@@ -88,14 +98,19 @@ files:
88
98
  - lib/cheminee/version.rb
89
99
  - openapi-generator-config.json
90
100
  - openapi.json
91
- - pkg/cheminee-0.1.5.gem
101
+ - pkg/cheminee-0.1.6.gem
92
102
  - spec/api/default_api_spec.rb
93
103
  - spec/api_client_spec.rb
94
104
  - spec/configuration_spec.rb
105
+ - spec/models/bulk_request_doc_spec.rb
106
+ - spec/models/bulk_request_spec.rb
95
107
  - spec/models/create_index_error_spec.rb
96
108
  - spec/models/get_indexes_response_error_spec.rb
97
109
  - spec/models/index_meta_spec.rb
98
110
  - spec/models/list_index_response_err_spec.rb
111
+ - spec/models/post_index_bulk_response_error_spec.rb
112
+ - spec/models/post_index_bulk_response_ok_spec.rb
113
+ - spec/models/post_index_bulk_response_ok_status_spec.rb
99
114
  - spec/models/schema_spec.rb
100
115
  - spec/models/smile_spec.rb
101
116
  - spec/models/standardized_smile_spec.rb
@@ -128,10 +143,15 @@ test_files:
128
143
  - spec/api/default_api_spec.rb
129
144
  - spec/api_client_spec.rb
130
145
  - spec/configuration_spec.rb
146
+ - spec/models/post_index_bulk_response_ok_spec.rb
147
+ - spec/models/post_index_bulk_response_error_spec.rb
131
148
  - spec/models/standardized_smile_spec.rb
132
149
  - spec/models/smile_spec.rb
133
150
  - spec/models/get_indexes_response_error_spec.rb
151
+ - spec/models/bulk_request_spec.rb
134
152
  - spec/models/substructure_search_hit_spec.rb
153
+ - spec/models/bulk_request_doc_spec.rb
154
+ - spec/models/post_index_bulk_response_ok_status_spec.rb
135
155
  - spec/models/schema_spec.rb
136
156
  - spec/models/list_index_response_err_spec.rb
137
157
  - spec/models/index_meta_spec.rb
Binary file