moonlogs-ruby 1.18.5 → 1.18.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -5
  3. data/docs/DefaultApi.md +48 -0
  4. data/docs/IncidentResponse.md +12 -0
  5. data/docs/IncidentSearchRequest.md +7 -0
  6. data/docs/InlineResponse20020.md +11 -0
  7. data/lib/moonlogs-ruby/api/default_api.rb +51 -1
  8. data/lib/moonlogs-ruby/api_client.rb +1 -1
  9. data/lib/moonlogs-ruby/api_error.rb +1 -1
  10. data/lib/moonlogs-ruby/configuration.rb +1 -1
  11. data/lib/moonlogs-ruby/models/action_request.rb +1 -1
  12. data/lib/moonlogs-ruby/models/action_response.rb +1 -1
  13. data/lib/moonlogs-ruby/models/api_token_request.rb +1 -1
  14. data/lib/moonlogs-ruby/models/api_token_response.rb +1 -1
  15. data/lib/moonlogs-ruby/models/condition.rb +1 -1
  16. data/lib/moonlogs-ruby/models/credentials.rb +1 -1
  17. data/lib/moonlogs-ruby/models/incident_response.rb +282 -0
  18. data/lib/moonlogs-ruby/models/incident_search_request.rb +206 -0
  19. data/lib/moonlogs-ruby/models/inline_response_200.rb +1 -1
  20. data/lib/moonlogs-ruby/models/inline_response_200_1.rb +1 -1
  21. data/lib/moonlogs-ruby/models/inline_response_200_10.rb +1 -1
  22. data/lib/moonlogs-ruby/models/inline_response_200_11.rb +1 -1
  23. data/lib/moonlogs-ruby/models/inline_response_200_12.rb +1 -1
  24. data/lib/moonlogs-ruby/models/inline_response_200_13.rb +1 -1
  25. data/lib/moonlogs-ruby/models/inline_response_200_14.rb +1 -1
  26. data/lib/moonlogs-ruby/models/inline_response_200_15.rb +1 -1
  27. data/lib/moonlogs-ruby/models/inline_response_200_16.rb +1 -1
  28. data/lib/moonlogs-ruby/models/inline_response_200_17.rb +1 -1
  29. data/lib/moonlogs-ruby/models/inline_response_200_18.rb +1 -1
  30. data/lib/moonlogs-ruby/models/inline_response_200_19.rb +1 -1
  31. data/lib/moonlogs-ruby/models/inline_response_200_2.rb +1 -1
  32. data/lib/moonlogs-ruby/models/inline_response_200_20.rb +269 -0
  33. data/lib/moonlogs-ruby/models/inline_response_200_3.rb +1 -1
  34. data/lib/moonlogs-ruby/models/inline_response_200_4.rb +1 -1
  35. data/lib/moonlogs-ruby/models/inline_response_200_5.rb +1 -1
  36. data/lib/moonlogs-ruby/models/inline_response_200_6.rb +1 -1
  37. data/lib/moonlogs-ruby/models/inline_response_200_7.rb +1 -1
  38. data/lib/moonlogs-ruby/models/inline_response_200_8.rb +1 -1
  39. data/lib/moonlogs-ruby/models/inline_response_200_9.rb +1 -1
  40. data/lib/moonlogs-ruby/models/level.rb +1 -1
  41. data/lib/moonlogs-ruby/models/meta.rb +1 -1
  42. data/lib/moonlogs-ruby/models/one_of_record_request_level.rb +1 -1
  43. data/lib/moonlogs-ruby/models/one_of_record_response_level.rb +1 -1
  44. data/lib/moonlogs-ruby/models/one_of_user_request_role.rb +1 -1
  45. data/lib/moonlogs-ruby/models/one_of_user_response_role.rb +1 -1
  46. data/lib/moonlogs-ruby/models/record_request.rb +1 -1
  47. data/lib/moonlogs-ruby/models/record_response.rb +1 -1
  48. data/lib/moonlogs-ruby/models/role.rb +1 -1
  49. data/lib/moonlogs-ruby/models/schema_field.rb +1 -1
  50. data/lib/moonlogs-ruby/models/schema_kind.rb +1 -1
  51. data/lib/moonlogs-ruby/models/schema_request.rb +1 -1
  52. data/lib/moonlogs-ruby/models/schema_response.rb +1 -1
  53. data/lib/moonlogs-ruby/models/session.rb +1 -1
  54. data/lib/moonlogs-ruby/models/tag_request.rb +1 -1
  55. data/lib/moonlogs-ruby/models/tag_response.rb +1 -1
  56. data/lib/moonlogs-ruby/models/user_request.rb +1 -1
  57. data/lib/moonlogs-ruby/models/user_response.rb +1 -1
  58. data/lib/moonlogs-ruby/version.rb +2 -2
  59. data/lib/moonlogs-ruby.rb +4 -1
  60. data/moonlogs-ruby.gemspec +1 -1
  61. data/spec/models/incident_response_spec.rb +70 -0
  62. data/spec/models/incident_search_request_spec.rb +40 -0
  63. data/spec/models/inline_response_200_20_spec.rb +64 -0
  64. metadata +14 -2
@@ -0,0 +1,206 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 1.18.7
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module MoonlogsRuby
15
+ class IncidentSearchRequest
16
+ attr_accessor :keys
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'keys' => :'keys'
22
+ }
23
+ end
24
+
25
+ # Attribute type mapping.
26
+ def self.openapi_types
27
+ {
28
+ :'keys' => :'Object'
29
+ }
30
+ end
31
+
32
+ # List of attributes with nullable: true
33
+ def self.openapi_nullable
34
+ Set.new([
35
+ ])
36
+ end
37
+
38
+ # Initializes the object
39
+ # @param [Hash] attributes Model attributes in the form of hash
40
+ def initialize(attributes = {})
41
+ if (!attributes.is_a?(Hash))
42
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MoonlogsRuby::IncidentSearchRequest` initialize method"
43
+ end
44
+
45
+ # check to see if the attribute exists and convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}) { |(k, v), h|
47
+ if (!self.class.attribute_map.key?(k.to_sym))
48
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MoonlogsRuby::IncidentSearchRequest`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
49
+ end
50
+ h[k.to_sym] = v
51
+ }
52
+
53
+ if attributes.key?(:'keys')
54
+ self.keys = attributes[:'keys']
55
+ end
56
+ end
57
+
58
+ # Show invalid properties with the reasons. Usually used together with valid?
59
+ # @return Array for valid properties with the reasons
60
+ def list_invalid_properties
61
+ invalid_properties = Array.new
62
+ invalid_properties
63
+ end
64
+
65
+ # Check to see if the all the properties in the model are valid
66
+ # @return true if the model is valid
67
+ def valid?
68
+ true
69
+ end
70
+
71
+ # Checks equality by comparing each attribute.
72
+ # @param [Object] Object to be compared
73
+ def ==(o)
74
+ return true if self.equal?(o)
75
+ self.class == o.class &&
76
+ keys == o.keys
77
+ end
78
+
79
+ # @see the `==` method
80
+ # @param [Object] Object to be compared
81
+ def eql?(o)
82
+ self == o
83
+ end
84
+
85
+ # Calculates hash code according to all attributes.
86
+ # @return [Integer] Hash code
87
+ def hash
88
+ [keys].hash
89
+ end
90
+
91
+ # Builds the object from hash
92
+ # @param [Hash] attributes Model attributes in the form of hash
93
+ # @return [Object] Returns the model itself
94
+ def self.build_from_hash(attributes)
95
+ new.build_from_hash(attributes)
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def build_from_hash(attributes)
102
+ return nil unless attributes.is_a?(Hash)
103
+ self.class.openapi_types.each_pair do |key, type|
104
+ if type =~ /\AArray<(.*)>/i
105
+ # check to ensure the input is an array given that the attribute
106
+ # is documented as an array but the input is not
107
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
108
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
109
+ end
110
+ elsif !attributes[self.class.attribute_map[key]].nil?
111
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
112
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
113
+ self.send("#{key}=", nil)
114
+ end
115
+ end
116
+
117
+ self
118
+ end
119
+
120
+ # Deserializes the data based on type
121
+ # @param string type Data type
122
+ # @param string value Value to be deserialized
123
+ # @return [Object] Deserialized data
124
+ def _deserialize(type, value)
125
+ case type.to_sym
126
+ when :DateTime
127
+ DateTime.parse(value)
128
+ when :Date
129
+ Date.parse(value)
130
+ when :String
131
+ value.to_s
132
+ when :Integer
133
+ value.to_i
134
+ when :Float
135
+ value.to_f
136
+ when :Boolean
137
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
138
+ true
139
+ else
140
+ false
141
+ end
142
+ when :Object
143
+ # generic object (usually a Hash), return directly
144
+ value
145
+ when /\AArray<(?<inner_type>.+)>\z/
146
+ inner_type = Regexp.last_match[:inner_type]
147
+ value.map { |v| _deserialize(inner_type, v) }
148
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
149
+ k_type = Regexp.last_match[:k_type]
150
+ v_type = Regexp.last_match[:v_type]
151
+ {}.tap do |hash|
152
+ value.each do |k, v|
153
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
154
+ end
155
+ end
156
+ else # model
157
+ MoonlogsRuby.const_get(type).build_from_hash(value)
158
+ end
159
+ end
160
+
161
+ # Returns the string representation of the object
162
+ # @return [String] String presentation of the object
163
+ def to_s
164
+ to_hash.to_s
165
+ end
166
+
167
+ # to_body is an alias to to_hash (backward compatibility)
168
+ # @return [Hash] Returns the object in the form of hash
169
+ def to_body
170
+ to_hash
171
+ end
172
+
173
+ # Returns the object in the form of hash
174
+ # @return [Hash] Returns the object in the form of hash
175
+ def to_hash
176
+ hash = {}
177
+ self.class.attribute_map.each_pair do |attr, param|
178
+ value = self.send(attr)
179
+ if value.nil?
180
+ is_nullable = self.class.openapi_nullable.include?(attr)
181
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
182
+ end
183
+
184
+ hash[param] = _to_hash(value)
185
+ end
186
+ hash
187
+ end
188
+
189
+ # Outputs non-array value in the form of hash
190
+ # For object, use to_hash. Otherwise, just return the value
191
+ # @param [Object] value Any valid value
192
+ # @return [Hash] Returns the value in the form of hash
193
+ def _to_hash(value)
194
+ if value.is_a?(Array)
195
+ value.compact.map { |v| _to_hash(v) }
196
+ elsif value.is_a?(Hash)
197
+ {}.tap do |hash|
198
+ value.each { |k, v| hash[k] = _to_hash(v) }
199
+ end
200
+ elsif value.respond_to? :to_hash
201
+ value.to_hash
202
+ else
203
+ value
204
+ end
205
+ end end
206
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -0,0 +1,269 @@
1
+ =begin
2
+ #Moonlogs
3
+
4
+ #Moonlogs API
5
+
6
+ OpenAPI spec version: 1.18.7
7
+ Contact: shalpack@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.52
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module MoonlogsRuby
15
+ class InlineResponse20020
16
+ attr_accessor :success
17
+
18
+ attr_accessor :code
19
+
20
+ attr_accessor :error
21
+
22
+ attr_accessor :data
23
+
24
+ attr_accessor :meta
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'success' => :'success',
30
+ :'code' => :'code',
31
+ :'error' => :'error',
32
+ :'data' => :'data',
33
+ :'meta' => :'meta'
34
+ }
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'success' => :'Object',
41
+ :'code' => :'Object',
42
+ :'error' => :'Object',
43
+ :'data' => :'Object',
44
+ :'meta' => :'Object'
45
+ }
46
+ end
47
+
48
+ # List of attributes with nullable: true
49
+ def self.openapi_nullable
50
+ Set.new([
51
+ ])
52
+ end
53
+
54
+ # Initializes the object
55
+ # @param [Hash] attributes Model attributes in the form of hash
56
+ def initialize(attributes = {})
57
+ if (!attributes.is_a?(Hash))
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MoonlogsRuby::InlineResponse20020` initialize method"
59
+ end
60
+
61
+ # check to see if the attribute exists and convert string to symbol for hash key
62
+ attributes = attributes.each_with_object({}) { |(k, v), h|
63
+ if (!self.class.attribute_map.key?(k.to_sym))
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MoonlogsRuby::InlineResponse20020`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
+ end
66
+ h[k.to_sym] = v
67
+ }
68
+
69
+ if attributes.key?(:'success')
70
+ self.success = attributes[:'success']
71
+ end
72
+
73
+ if attributes.key?(:'code')
74
+ self.code = attributes[:'code']
75
+ end
76
+
77
+ if attributes.key?(:'error')
78
+ self.error = attributes[:'error']
79
+ end
80
+
81
+ if attributes.key?(:'data')
82
+ if (value = attributes[:'data']).is_a?(Array)
83
+ self.data = value
84
+ end
85
+ end
86
+
87
+ if attributes.key?(:'meta')
88
+ self.meta = attributes[:'meta']
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
+ invalid_properties = Array.new
96
+ if @success.nil?
97
+ invalid_properties.push('invalid value for "success", success cannot be nil.')
98
+ end
99
+
100
+ if @code.nil?
101
+ invalid_properties.push('invalid value for "code", code cannot be nil.')
102
+ end
103
+
104
+ if @error.nil?
105
+ invalid_properties.push('invalid value for "error", error cannot be nil.')
106
+ end
107
+
108
+ if @data.nil?
109
+ invalid_properties.push('invalid value for "data", data cannot be nil.')
110
+ end
111
+
112
+ if @meta.nil?
113
+ invalid_properties.push('invalid value for "meta", meta cannot be nil.')
114
+ end
115
+
116
+ invalid_properties
117
+ end
118
+
119
+ # Check to see if the all the properties in the model are valid
120
+ # @return true if the model is valid
121
+ def valid?
122
+ return false if @success.nil?
123
+ return false if @code.nil?
124
+ return false if @error.nil?
125
+ return false if @data.nil?
126
+ return false if @meta.nil?
127
+ true
128
+ end
129
+
130
+ # Checks equality by comparing each attribute.
131
+ # @param [Object] Object to be compared
132
+ def ==(o)
133
+ return true if self.equal?(o)
134
+ self.class == o.class &&
135
+ success == o.success &&
136
+ code == o.code &&
137
+ error == o.error &&
138
+ data == o.data &&
139
+ meta == o.meta
140
+ end
141
+
142
+ # @see the `==` method
143
+ # @param [Object] Object to be compared
144
+ def eql?(o)
145
+ self == o
146
+ end
147
+
148
+ # Calculates hash code according to all attributes.
149
+ # @return [Integer] Hash code
150
+ def hash
151
+ [success, code, error, data, meta].hash
152
+ end
153
+
154
+ # Builds the object from hash
155
+ # @param [Hash] attributes Model attributes in the form of hash
156
+ # @return [Object] Returns the model itself
157
+ def self.build_from_hash(attributes)
158
+ new.build_from_hash(attributes)
159
+ end
160
+
161
+ # Builds the object from hash
162
+ # @param [Hash] attributes Model attributes in the form of hash
163
+ # @return [Object] Returns the model itself
164
+ def build_from_hash(attributes)
165
+ return nil unless attributes.is_a?(Hash)
166
+ self.class.openapi_types.each_pair do |key, type|
167
+ if type =~ /\AArray<(.*)>/i
168
+ # check to ensure the input is an array given that the attribute
169
+ # is documented as an array but the input is not
170
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
171
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
172
+ end
173
+ elsif !attributes[self.class.attribute_map[key]].nil?
174
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
175
+ elsif attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
176
+ self.send("#{key}=", nil)
177
+ end
178
+ end
179
+
180
+ self
181
+ end
182
+
183
+ # Deserializes the data based on type
184
+ # @param string type Data type
185
+ # @param string value Value to be deserialized
186
+ # @return [Object] Deserialized data
187
+ def _deserialize(type, value)
188
+ case type.to_sym
189
+ when :DateTime
190
+ DateTime.parse(value)
191
+ when :Date
192
+ Date.parse(value)
193
+ when :String
194
+ value.to_s
195
+ when :Integer
196
+ value.to_i
197
+ when :Float
198
+ value.to_f
199
+ when :Boolean
200
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
201
+ true
202
+ else
203
+ false
204
+ end
205
+ when :Object
206
+ # generic object (usually a Hash), return directly
207
+ value
208
+ when /\AArray<(?<inner_type>.+)>\z/
209
+ inner_type = Regexp.last_match[:inner_type]
210
+ value.map { |v| _deserialize(inner_type, v) }
211
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
212
+ k_type = Regexp.last_match[:k_type]
213
+ v_type = Regexp.last_match[:v_type]
214
+ {}.tap do |hash|
215
+ value.each do |k, v|
216
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
217
+ end
218
+ end
219
+ else # model
220
+ MoonlogsRuby.const_get(type).build_from_hash(value)
221
+ end
222
+ end
223
+
224
+ # Returns the string representation of the object
225
+ # @return [String] String presentation of the object
226
+ def to_s
227
+ to_hash.to_s
228
+ end
229
+
230
+ # to_body is an alias to to_hash (backward compatibility)
231
+ # @return [Hash] Returns the object in the form of hash
232
+ def to_body
233
+ to_hash
234
+ end
235
+
236
+ # Returns the object in the form of hash
237
+ # @return [Hash] Returns the object in the form of hash
238
+ def to_hash
239
+ hash = {}
240
+ self.class.attribute_map.each_pair do |attr, param|
241
+ value = self.send(attr)
242
+ if value.nil?
243
+ is_nullable = self.class.openapi_nullable.include?(attr)
244
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
245
+ end
246
+
247
+ hash[param] = _to_hash(value)
248
+ end
249
+ hash
250
+ end
251
+
252
+ # Outputs non-array value in the form of hash
253
+ # For object, use to_hash. Otherwise, just return the value
254
+ # @param [Object] value Any valid value
255
+ # @return [Hash] Returns the value in the form of hash
256
+ def _to_hash(value)
257
+ if value.is_a?(Array)
258
+ value.compact.map { |v| _to_hash(v) }
259
+ elsif value.is_a?(Hash)
260
+ {}.tap do |hash|
261
+ value.each { |k, v| hash[k] = _to_hash(v) }
262
+ end
263
+ elsif value.respond_to? :to_hash
264
+ value.to_hash
265
+ else
266
+ value
267
+ end
268
+ end end
269
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Moonlogs API
5
5
 
6
- OpenAPI spec version: 1.18.5
6
+ OpenAPI spec version: 1.18.7
7
7
  Contact: shalpack@gmail.com
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
  Swagger Codegen version: 3.0.52