artikcloud 2.0.8 → 2.1.0
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.
- checksums.yaml +4 -4
- data/Gemfile +5 -2
- data/LICENSE +1 -1
- data/README.md +39 -4
- data/Rakefile +8 -0
- data/artikcloud.gemspec +5 -16
- data/docs/Device.md +2 -0
- data/docs/DeviceShareInfo.md +8 -0
- data/docs/DeviceSharing.md +11 -0
- data/docs/DeviceSharingArray.md +8 -0
- data/docs/DeviceSharingEnvelope.md +11 -0
- data/docs/DeviceSharingId.md +8 -0
- data/docs/DeviceStatus.md +9 -0
- data/docs/DeviceStatusBatch.md +11 -0
- data/docs/DeviceStatusData.md +12 -0
- data/docs/DeviceStatusPut.md +8 -0
- data/docs/DeviceStatusPutData.md +8 -0
- data/docs/DevicessharesApi.md +235 -0
- data/docs/DevicestatusApi.md +183 -0
- data/docs/NotifMessage.md +15 -0
- data/docs/NotifMessageArray.md +8 -0
- data/docs/NotifMessagesResponse.md +12 -0
- data/docs/Subscription.md +24 -0
- data/docs/SubscriptionArray.md +8 -0
- data/docs/SubscriptionEnvelope.md +8 -0
- data/docs/SubscriptionInfo.md +20 -0
- data/docs/SubscriptionsApi.md +342 -0
- data/docs/SubscriptionsEnvelope.md +11 -0
- data/docs/TaskParameters.md +2 -0
- data/docs/UpdateParameters.md +8 -0
- data/docs/UsersApi.md +67 -1
- data/docs/ValidationCallbackInfo.md +9 -0
- data/git_push.sh +0 -12
- data/lib/artikcloud.rb +24 -13
- data/lib/artikcloud/api/device_types_api.rb +7 -55
- data/lib/artikcloud/api/devices_api.rb +12 -66
- data/lib/artikcloud/api/devices_management_api.rb +16 -118
- data/lib/artikcloud/api/devicesshares_api.rb +244 -0
- data/lib/artikcloud/api/devicestatus_api.rb +190 -0
- data/lib/artikcloud/api/export_api.rb +5 -41
- data/lib/artikcloud/api/messages_api.rb +10 -76
- data/lib/artikcloud/api/registrations_api.rb +4 -34
- data/lib/artikcloud/api/rules_api.rb +5 -41
- data/lib/artikcloud/api/subscriptions_api.rb +346 -0
- data/lib/artikcloud/api/tags_api.rb +4 -34
- data/lib/artikcloud/api/tokens_api.rb +5 -33
- data/lib/artikcloud/api/users_api.rb +79 -67
- data/lib/artikcloud/api_client.rb +17 -20
- data/lib/artikcloud/api_error.rb +8 -18
- data/lib/artikcloud/configuration.rb +1 -13
- data/lib/artikcloud/models/ack_envelope.rb +4 -16
- data/lib/artikcloud/models/acknowledgement.rb +4 -16
- data/lib/artikcloud/models/action.rb +4 -16
- data/lib/artikcloud/models/action_array.rb +4 -16
- data/lib/artikcloud/models/action_details.rb +4 -16
- data/lib/artikcloud/models/action_details_array.rb +4 -16
- data/lib/artikcloud/models/action_in.rb +4 -16
- data/lib/artikcloud/models/action_out.rb +4 -16
- data/lib/artikcloud/models/actions.rb +4 -16
- data/lib/artikcloud/models/aggregate_data.rb +4 -16
- data/lib/artikcloud/models/aggregates_histogram_data.rb +4 -16
- data/lib/artikcloud/models/aggregates_histogram_response.rb +4 -16
- data/lib/artikcloud/models/aggregates_response.rb +4 -16
- data/lib/artikcloud/models/app_properties.rb +8 -16
- data/lib/artikcloud/models/check_token_message.rb +4 -16
- data/lib/artikcloud/models/check_token_response.rb +4 -16
- data/lib/artikcloud/models/device.rb +28 -20
- data/lib/artikcloud/models/device_array.rb +4 -16
- data/lib/artikcloud/models/device_envelope.rb +8 -16
- data/lib/artikcloud/models/device_reg_complete_request.rb +4 -16
- data/lib/artikcloud/models/device_reg_confirm_user_request.rb +4 -16
- data/lib/artikcloud/models/device_reg_confirm_user_response.rb +4 -16
- data/lib/artikcloud/models/device_reg_confirm_user_response_envelope.rb +4 -16
- data/lib/artikcloud/models/device_reg_status_response.rb +4 -16
- data/lib/artikcloud/models/device_reg_status_response_envelope.rb +4 -16
- data/lib/artikcloud/models/device_share_info.rb +188 -0
- data/lib/artikcloud/models/device_sharing.rb +218 -0
- data/lib/artikcloud/models/device_sharing_array.rb +189 -0
- data/lib/artikcloud/models/device_sharing_envelope.rb +214 -0
- data/lib/artikcloud/models/device_sharing_id.rb +188 -0
- data/lib/artikcloud/models/device_status.rb +196 -0
- data/lib/artikcloud/models/device_status_batch.rb +216 -0
- data/lib/artikcloud/models/device_status_data.rb +225 -0
- data/lib/artikcloud/models/device_status_put.rb +187 -0
- data/lib/artikcloud/models/device_status_put_data.rb +187 -0
- data/lib/artikcloud/models/device_task.rb +4 -16
- data/lib/artikcloud/models/device_task_update_request.rb +4 -16
- data/lib/artikcloud/models/device_task_update_response.rb +4 -16
- data/lib/artikcloud/models/device_token.rb +20 -16
- data/lib/artikcloud/models/device_token_envelope.rb +8 -16
- data/lib/artikcloud/models/device_type.rb +4 -16
- data/lib/artikcloud/models/device_type_array.rb +4 -16
- data/lib/artikcloud/models/device_type_envelope.rb +8 -16
- data/lib/artikcloud/models/device_type_info.rb +4 -16
- data/lib/artikcloud/models/device_type_info_envelope.rb +4 -16
- data/lib/artikcloud/models/device_types_envelope.rb +16 -16
- data/lib/artikcloud/models/device_types_info.rb +4 -16
- data/lib/artikcloud/models/device_types_info_envelope.rb +4 -16
- data/lib/artikcloud/models/devices_envelope.rb +16 -16
- data/lib/artikcloud/models/error_envelope.rb +4 -16
- data/lib/artikcloud/models/event_feed_data.rb +4 -16
- data/lib/artikcloud/models/export_data.rb +4 -16
- data/lib/artikcloud/models/export_data_array.rb +4 -16
- data/lib/artikcloud/models/export_history_response.rb +4 -16
- data/lib/artikcloud/models/export_normalized_messages_response.rb +4 -16
- data/lib/artikcloud/models/export_request.rb +4 -16
- data/lib/artikcloud/models/export_request_data.rb +4 -16
- data/lib/artikcloud/models/export_request_info.rb +4 -16
- data/lib/artikcloud/models/export_request_response.rb +4 -16
- data/lib/artikcloud/models/export_response.rb +4 -16
- data/lib/artikcloud/models/export_status_response.rb +4 -16
- data/lib/artikcloud/models/field_path.rb +4 -16
- data/lib/artikcloud/models/field_presence.rb +8 -16
- data/lib/artikcloud/models/field_presence_envelope.rb +32 -16
- data/lib/artikcloud/models/fields_actions.rb +4 -16
- data/lib/artikcloud/models/manifest_properties.rb +8 -16
- data/lib/artikcloud/models/manifest_properties_envelope.rb +8 -16
- data/lib/artikcloud/models/manifest_versions.rb +8 -16
- data/lib/artikcloud/models/manifest_versions_envelope.rb +8 -16
- data/lib/artikcloud/models/message.rb +4 -16
- data/lib/artikcloud/models/message_action.rb +4 -16
- data/lib/artikcloud/models/message_id.rb +4 -16
- data/lib/artikcloud/models/message_id_envelope.rb +4 -16
- data/lib/artikcloud/models/message_in.rb +4 -16
- data/lib/artikcloud/models/message_out.rb +4 -16
- data/lib/artikcloud/models/metadata_envelope.rb +4 -16
- data/lib/artikcloud/models/metadata_properties_envelope.rb +4 -16
- data/lib/artikcloud/models/metadata_query_envelope.rb +4 -16
- data/lib/artikcloud/models/non_empty_string.rb +4 -16
- data/lib/artikcloud/models/normalized_action.rb +36 -16
- data/lib/artikcloud/models/normalized_actions_envelope.rb +16 -16
- data/lib/artikcloud/models/normalized_message.rb +36 -16
- data/lib/artikcloud/models/normalized_messages_envelope.rb +16 -16
- data/lib/artikcloud/models/notif_message.rb +252 -0
- data/lib/artikcloud/models/notif_message_array.rb +189 -0
- data/lib/artikcloud/models/notif_messages_response.rb +223 -0
- data/lib/artikcloud/models/output_rule.rb +4 -16
- data/lib/artikcloud/models/presence_envelope.rb +4 -16
- data/lib/artikcloud/models/presence_model.rb +4 -16
- data/lib/artikcloud/models/properties_envelope.rb +8 -16
- data/lib/artikcloud/models/refresh_token_response.rb +4 -16
- data/lib/artikcloud/models/register_message.rb +4 -16
- data/lib/artikcloud/models/rule_array.rb +4 -16
- data/lib/artikcloud/models/rule_creation_info.rb +4 -16
- data/lib/artikcloud/models/rule_envelope.rb +4 -16
- data/lib/artikcloud/models/rule_error.rb +4 -16
- data/lib/artikcloud/models/rule_update_info.rb +4 -16
- data/lib/artikcloud/models/rule_warning_output.rb +4 -16
- data/lib/artikcloud/models/rules_envelope.rb +4 -16
- data/lib/artikcloud/models/snapshot_response.rb +4 -16
- data/lib/artikcloud/models/snapshot_responses.rb +4 -16
- data/lib/artikcloud/models/snapshots_response_envelope.rb +4 -16
- data/lib/artikcloud/models/subscription.rb +348 -0
- data/lib/artikcloud/models/subscription_array.rb +189 -0
- data/lib/artikcloud/models/subscription_envelope.rb +187 -0
- data/lib/artikcloud/models/subscription_info.rb +308 -0
- data/lib/artikcloud/models/subscriptions_envelope.rb +214 -0
- data/lib/artikcloud/models/tag.rb +4 -16
- data/lib/artikcloud/models/tag_array.rb +4 -16
- data/lib/artikcloud/models/tags_envelope.rb +4 -16
- data/lib/artikcloud/models/task.rb +4 -16
- data/lib/artikcloud/models/task_by_did.rb +4 -16
- data/lib/artikcloud/models/task_by_did_list.rb +4 -16
- data/lib/artikcloud/models/task_by_did_list_envelope.rb +4 -16
- data/lib/artikcloud/models/task_envelope.rb +4 -16
- data/lib/artikcloud/models/task_history.rb +4 -16
- data/lib/artikcloud/models/task_history_list.rb +4 -16
- data/lib/artikcloud/models/task_list.rb +4 -16
- data/lib/artikcloud/models/task_list_envelope.rb +4 -16
- data/lib/artikcloud/models/task_parameters.rb +25 -17
- data/lib/artikcloud/models/task_request.rb +4 -16
- data/lib/artikcloud/models/task_status.rb +4 -16
- data/lib/artikcloud/models/task_status_counts.rb +4 -16
- data/lib/artikcloud/models/task_statuses.rb +4 -16
- data/lib/artikcloud/models/task_statuses_envelope.rb +4 -16
- data/lib/artikcloud/models/task_statuses_history_envelope.rb +4 -16
- data/lib/artikcloud/models/task_update_request.rb +4 -16
- data/lib/artikcloud/models/task_update_response.rb +4 -16
- data/lib/artikcloud/models/tasks_status_counts.rb +4 -16
- data/lib/artikcloud/models/token.rb +4 -16
- data/lib/artikcloud/models/token_info.rb +4 -16
- data/lib/artikcloud/models/token_info_success_response.rb +4 -16
- data/lib/artikcloud/models/token_request.rb +4 -16
- data/lib/artikcloud/models/token_response.rb +4 -16
- data/lib/artikcloud/models/unregister_device_response.rb +4 -16
- data/lib/artikcloud/models/unregister_device_response_envelope.rb +4 -16
- data/lib/artikcloud/models/update_parameters.rb +188 -0
- data/lib/artikcloud/models/user.rb +28 -16
- data/lib/artikcloud/models/user_envelope.rb +8 -16
- data/lib/artikcloud/models/validation_callback_info.rb +198 -0
- data/lib/artikcloud/models/web_socket_error.rb +4 -16
- data/lib/artikcloud/version.rb +2 -14
- data/pom.xml +1 -1
- data/spec/api/devicesshares_api_spec.rb +87 -0
- data/spec/api/devicestatus_api_spec.rb +75 -0
- data/spec/api/subscriptions_api_spec.rb +112 -0
- metadata +58 -26
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require 'date'
|
|
@@ -129,7 +117,7 @@ module ArtikCloud
|
|
|
129
117
|
def build_from_hash(attributes)
|
|
130
118
|
return nil unless attributes.is_a?(Hash)
|
|
131
119
|
self.class.swagger_types.each_pair do |key, type|
|
|
132
|
-
if type =~
|
|
120
|
+
if type =~ /\AArray<(.*)>/i
|
|
133
121
|
# check to ensure the input is an array given that the the attribute
|
|
134
122
|
# is documented as an array but the input is not
|
|
135
123
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -160,7 +148,7 @@ module ArtikCloud
|
|
|
160
148
|
when :Float
|
|
161
149
|
value.to_f
|
|
162
150
|
when :BOOLEAN
|
|
163
|
-
if value.to_s =~
|
|
151
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
164
152
|
true
|
|
165
153
|
else
|
|
166
154
|
false
|
|
@@ -171,7 +159,7 @@ module ArtikCloud
|
|
|
171
159
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
172
160
|
inner_type = Regexp.last_match[:inner_type]
|
|
173
161
|
value.map { |v| _deserialize(inner_type, v) }
|
|
174
|
-
when /\AHash<(?<k_type
|
|
162
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
175
163
|
k_type = Regexp.last_match[:k_type]
|
|
176
164
|
v_type = Regexp.last_match[:v_type]
|
|
177
165
|
{}.tap do |hash|
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require 'date'
|
|
@@ -96,7 +84,7 @@ module ArtikCloud
|
|
|
96
84
|
def build_from_hash(attributes)
|
|
97
85
|
return nil unless attributes.is_a?(Hash)
|
|
98
86
|
self.class.swagger_types.each_pair do |key, type|
|
|
99
|
-
if type =~
|
|
87
|
+
if type =~ /\AArray<(.*)>/i
|
|
100
88
|
# check to ensure the input is an array given that the the attribute
|
|
101
89
|
# is documented as an array but the input is not
|
|
102
90
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -127,7 +115,7 @@ module ArtikCloud
|
|
|
127
115
|
when :Float
|
|
128
116
|
value.to_f
|
|
129
117
|
when :BOOLEAN
|
|
130
|
-
if value.to_s =~
|
|
118
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
131
119
|
true
|
|
132
120
|
else
|
|
133
121
|
false
|
|
@@ -138,7 +126,7 @@ module ArtikCloud
|
|
|
138
126
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
139
127
|
inner_type = Regexp.last_match[:inner_type]
|
|
140
128
|
value.map { |v| _deserialize(inner_type, v) }
|
|
141
|
-
when /\AHash<(?<k_type
|
|
129
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
142
130
|
k_type = Regexp.last_match[:k_type]
|
|
143
131
|
v_type = Regexp.last_match[:v_type]
|
|
144
132
|
{}.tap do |hash|
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require 'date'
|
|
@@ -125,6 +113,38 @@ module ArtikCloud
|
|
|
125
113
|
# @return Array for valid properies with the reasons
|
|
126
114
|
def list_invalid_properties
|
|
127
115
|
invalid_properties = Array.new
|
|
116
|
+
if @cts.nil?
|
|
117
|
+
invalid_properties.push("invalid value for 'cts', cts cannot be nil.")
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
if @ts.nil?
|
|
121
|
+
invalid_properties.push("invalid value for 'ts', ts cannot be nil.")
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
if @mid.nil?
|
|
125
|
+
invalid_properties.push("invalid value for 'mid', mid cannot be nil.")
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if @ddid.nil?
|
|
129
|
+
invalid_properties.push("invalid value for 'ddid', ddid cannot be nil.")
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
if @ddtid.nil?
|
|
133
|
+
invalid_properties.push("invalid value for 'ddtid', ddtid cannot be nil.")
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
if @uid.nil?
|
|
137
|
+
invalid_properties.push("invalid value for 'uid', uid cannot be nil.")
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
if @mv.nil?
|
|
141
|
+
invalid_properties.push("invalid value for 'mv', mv cannot be nil.")
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
if @data.nil?
|
|
145
|
+
invalid_properties.push("invalid value for 'data', data cannot be nil.")
|
|
146
|
+
end
|
|
147
|
+
|
|
128
148
|
return invalid_properties
|
|
129
149
|
end
|
|
130
150
|
|
|
@@ -176,7 +196,7 @@ module ArtikCloud
|
|
|
176
196
|
def build_from_hash(attributes)
|
|
177
197
|
return nil unless attributes.is_a?(Hash)
|
|
178
198
|
self.class.swagger_types.each_pair do |key, type|
|
|
179
|
-
if type =~
|
|
199
|
+
if type =~ /\AArray<(.*)>/i
|
|
180
200
|
# check to ensure the input is an array given that the the attribute
|
|
181
201
|
# is documented as an array but the input is not
|
|
182
202
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -207,7 +227,7 @@ module ArtikCloud
|
|
|
207
227
|
when :Float
|
|
208
228
|
value.to_f
|
|
209
229
|
when :BOOLEAN
|
|
210
|
-
if value.to_s =~
|
|
230
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
211
231
|
true
|
|
212
232
|
else
|
|
213
233
|
false
|
|
@@ -218,7 +238,7 @@ module ArtikCloud
|
|
|
218
238
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
219
239
|
inner_type = Regexp.last_match[:inner_type]
|
|
220
240
|
value.map { |v| _deserialize(inner_type, v) }
|
|
221
|
-
when /\AHash<(?<k_type
|
|
241
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
222
242
|
k_type = Regexp.last_match[:k_type]
|
|
223
243
|
v_type = Regexp.last_match[:v_type]
|
|
224
244
|
{}.tap do |hash|
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require 'date'
|
|
@@ -135,6 +123,18 @@ module ArtikCloud
|
|
|
135
123
|
# @return Array for valid properies with the reasons
|
|
136
124
|
def list_invalid_properties
|
|
137
125
|
invalid_properties = Array.new
|
|
126
|
+
if @count.nil?
|
|
127
|
+
invalid_properties.push("invalid value for 'count', count cannot be nil.")
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @size.nil?
|
|
131
|
+
invalid_properties.push("invalid value for 'size', size cannot be nil.")
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @data.nil?
|
|
135
|
+
invalid_properties.push("invalid value for 'data', data cannot be nil.")
|
|
136
|
+
end
|
|
137
|
+
|
|
138
138
|
return invalid_properties
|
|
139
139
|
end
|
|
140
140
|
|
|
@@ -182,7 +182,7 @@ module ArtikCloud
|
|
|
182
182
|
def build_from_hash(attributes)
|
|
183
183
|
return nil unless attributes.is_a?(Hash)
|
|
184
184
|
self.class.swagger_types.each_pair do |key, type|
|
|
185
|
-
if type =~
|
|
185
|
+
if type =~ /\AArray<(.*)>/i
|
|
186
186
|
# check to ensure the input is an array given that the the attribute
|
|
187
187
|
# is documented as an array but the input is not
|
|
188
188
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -213,7 +213,7 @@ module ArtikCloud
|
|
|
213
213
|
when :Float
|
|
214
214
|
value.to_f
|
|
215
215
|
when :BOOLEAN
|
|
216
|
-
if value.to_s =~
|
|
216
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
217
217
|
true
|
|
218
218
|
else
|
|
219
219
|
false
|
|
@@ -224,7 +224,7 @@ module ArtikCloud
|
|
|
224
224
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
225
225
|
inner_type = Regexp.last_match[:inner_type]
|
|
226
226
|
value.map { |v| _deserialize(inner_type, v) }
|
|
227
|
-
when /\AHash<(?<k_type
|
|
227
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
228
228
|
k_type = Regexp.last_match[:k_type]
|
|
229
229
|
v_type = Regexp.last_match[:v_type]
|
|
230
230
|
{}.tap do |hash|
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require 'date'
|
|
@@ -119,6 +107,38 @@ module ArtikCloud
|
|
|
119
107
|
# @return Array for valid properies with the reasons
|
|
120
108
|
def list_invalid_properties
|
|
121
109
|
invalid_properties = Array.new
|
|
110
|
+
if @cts.nil?
|
|
111
|
+
invalid_properties.push("invalid value for 'cts', cts cannot be nil.")
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
if @ts.nil?
|
|
115
|
+
invalid_properties.push("invalid value for 'ts', ts cannot be nil.")
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
if @mid.nil?
|
|
119
|
+
invalid_properties.push("invalid value for 'mid', mid cannot be nil.")
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if @sdid.nil?
|
|
123
|
+
invalid_properties.push("invalid value for 'sdid', sdid cannot be nil.")
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
if @sdtid.nil?
|
|
127
|
+
invalid_properties.push("invalid value for 'sdtid', sdtid cannot be nil.")
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @uid.nil?
|
|
131
|
+
invalid_properties.push("invalid value for 'uid', uid cannot be nil.")
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @mv.nil?
|
|
135
|
+
invalid_properties.push("invalid value for 'mv', mv cannot be nil.")
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
if @data.nil?
|
|
139
|
+
invalid_properties.push("invalid value for 'data', data cannot be nil.")
|
|
140
|
+
end
|
|
141
|
+
|
|
122
142
|
return invalid_properties
|
|
123
143
|
end
|
|
124
144
|
|
|
@@ -169,7 +189,7 @@ module ArtikCloud
|
|
|
169
189
|
def build_from_hash(attributes)
|
|
170
190
|
return nil unless attributes.is_a?(Hash)
|
|
171
191
|
self.class.swagger_types.each_pair do |key, type|
|
|
172
|
-
if type =~
|
|
192
|
+
if type =~ /\AArray<(.*)>/i
|
|
173
193
|
# check to ensure the input is an array given that the the attribute
|
|
174
194
|
# is documented as an array but the input is not
|
|
175
195
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -200,7 +220,7 @@ module ArtikCloud
|
|
|
200
220
|
when :Float
|
|
201
221
|
value.to_f
|
|
202
222
|
when :BOOLEAN
|
|
203
|
-
if value.to_s =~
|
|
223
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
204
224
|
true
|
|
205
225
|
else
|
|
206
226
|
false
|
|
@@ -211,7 +231,7 @@ module ArtikCloud
|
|
|
211
231
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
212
232
|
inner_type = Regexp.last_match[:inner_type]
|
|
213
233
|
value.map { |v| _deserialize(inner_type, v) }
|
|
214
|
-
when /\AHash<(?<k_type
|
|
234
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
215
235
|
k_type = Regexp.last_match[:k_type]
|
|
216
236
|
v_type = Regexp.last_match[:v_type]
|
|
217
237
|
{}.tap do |hash|
|
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
=begin
|
|
2
2
|
#ARTIK Cloud API
|
|
3
3
|
|
|
4
|
-
#No
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
5
|
|
|
6
6
|
OpenAPI spec version: 2.0.0
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
|
|
10
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
11
|
-
you may not use this file except in compliance with the License.
|
|
12
|
-
You may obtain a copy of the License at
|
|
13
|
-
|
|
14
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
-
|
|
16
|
-
Unless required by applicable law or agreed to in writing, software
|
|
17
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
18
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
19
|
-
See the License for the specific language governing permissions and
|
|
20
|
-
limitations under the License.
|
|
21
|
-
|
|
22
10
|
=end
|
|
23
11
|
|
|
24
12
|
require 'date'
|
|
@@ -135,6 +123,18 @@ module ArtikCloud
|
|
|
135
123
|
# @return Array for valid properies with the reasons
|
|
136
124
|
def list_invalid_properties
|
|
137
125
|
invalid_properties = Array.new
|
|
126
|
+
if @count.nil?
|
|
127
|
+
invalid_properties.push("invalid value for 'count', count cannot be nil.")
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
if @size.nil?
|
|
131
|
+
invalid_properties.push("invalid value for 'size', size cannot be nil.")
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if @data.nil?
|
|
135
|
+
invalid_properties.push("invalid value for 'data', data cannot be nil.")
|
|
136
|
+
end
|
|
137
|
+
|
|
138
138
|
return invalid_properties
|
|
139
139
|
end
|
|
140
140
|
|
|
@@ -182,7 +182,7 @@ module ArtikCloud
|
|
|
182
182
|
def build_from_hash(attributes)
|
|
183
183
|
return nil unless attributes.is_a?(Hash)
|
|
184
184
|
self.class.swagger_types.each_pair do |key, type|
|
|
185
|
-
if type =~
|
|
185
|
+
if type =~ /\AArray<(.*)>/i
|
|
186
186
|
# check to ensure the input is an array given that the the attribute
|
|
187
187
|
# is documented as an array but the input is not
|
|
188
188
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
@@ -213,7 +213,7 @@ module ArtikCloud
|
|
|
213
213
|
when :Float
|
|
214
214
|
value.to_f
|
|
215
215
|
when :BOOLEAN
|
|
216
|
-
if value.to_s =~
|
|
216
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
217
217
|
true
|
|
218
218
|
else
|
|
219
219
|
false
|
|
@@ -224,7 +224,7 @@ module ArtikCloud
|
|
|
224
224
|
when /\AArray<(?<inner_type>.+)>\z/
|
|
225
225
|
inner_type = Regexp.last_match[:inner_type]
|
|
226
226
|
value.map { |v| _deserialize(inner_type, v) }
|
|
227
|
-
when /\AHash<(?<k_type
|
|
227
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
228
228
|
k_type = Regexp.last_match[:k_type]
|
|
229
229
|
v_type = Regexp.last_match[:v_type]
|
|
230
230
|
{}.tap do |hash|
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#ARTIK Cloud API
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 2.0.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
|
+
|
|
10
|
+
=end
|
|
11
|
+
|
|
12
|
+
require 'date'
|
|
13
|
+
|
|
14
|
+
module ArtikCloud
|
|
15
|
+
#
|
|
16
|
+
class NotifMessage
|
|
17
|
+
attr_accessor :uid
|
|
18
|
+
|
|
19
|
+
attr_accessor :cts
|
|
20
|
+
|
|
21
|
+
attr_accessor :data
|
|
22
|
+
|
|
23
|
+
attr_accessor :mid
|
|
24
|
+
|
|
25
|
+
attr_accessor :sdid
|
|
26
|
+
|
|
27
|
+
attr_accessor :mv
|
|
28
|
+
|
|
29
|
+
attr_accessor :sdtid
|
|
30
|
+
|
|
31
|
+
attr_accessor :ts
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
35
|
+
def self.attribute_map
|
|
36
|
+
{
|
|
37
|
+
:'uid' => :'uid',
|
|
38
|
+
:'cts' => :'cts',
|
|
39
|
+
:'data' => :'data',
|
|
40
|
+
:'mid' => :'mid',
|
|
41
|
+
:'sdid' => :'sdid',
|
|
42
|
+
:'mv' => :'mv',
|
|
43
|
+
:'sdtid' => :'sdtid',
|
|
44
|
+
:'ts' => :'ts'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.swagger_types
|
|
50
|
+
{
|
|
51
|
+
:'uid' => :'String',
|
|
52
|
+
:'cts' => :'Integer',
|
|
53
|
+
:'data' => :'Hash<String, Object>',
|
|
54
|
+
:'mid' => :'String',
|
|
55
|
+
:'sdid' => :'String',
|
|
56
|
+
:'mv' => :'String',
|
|
57
|
+
:'sdtid' => :'String',
|
|
58
|
+
:'ts' => :'Integer'
|
|
59
|
+
}
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Initializes the object
|
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
64
|
+
def initialize(attributes = {})
|
|
65
|
+
return unless attributes.is_a?(Hash)
|
|
66
|
+
|
|
67
|
+
# convert string to symbol for hash key
|
|
68
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
|
69
|
+
|
|
70
|
+
if attributes.has_key?(:'uid')
|
|
71
|
+
self.uid = attributes[:'uid']
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
if attributes.has_key?(:'cts')
|
|
75
|
+
self.cts = attributes[:'cts']
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
if attributes.has_key?(:'data')
|
|
79
|
+
if (value = attributes[:'data']).is_a?(Array)
|
|
80
|
+
self.data = value
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.has_key?(:'mid')
|
|
85
|
+
self.mid = attributes[:'mid']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.has_key?(:'sdid')
|
|
89
|
+
self.sdid = attributes[:'sdid']
|
|
90
|
+
end
|
|
91
|
+
|
|
92
|
+
if attributes.has_key?(:'mv')
|
|
93
|
+
self.mv = attributes[:'mv']
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
if attributes.has_key?(:'sdtid')
|
|
97
|
+
self.sdtid = attributes[:'sdtid']
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
if attributes.has_key?(:'ts')
|
|
101
|
+
self.ts = attributes[:'ts']
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
107
|
+
# @return Array for valid properies with the reasons
|
|
108
|
+
def list_invalid_properties
|
|
109
|
+
invalid_properties = Array.new
|
|
110
|
+
return invalid_properties
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Check to see if the all the properties in the model are valid
|
|
114
|
+
# @return true if the model is valid
|
|
115
|
+
def valid?
|
|
116
|
+
return true
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Checks equality by comparing each attribute.
|
|
120
|
+
# @param [Object] Object to be compared
|
|
121
|
+
def ==(o)
|
|
122
|
+
return true if self.equal?(o)
|
|
123
|
+
self.class == o.class &&
|
|
124
|
+
uid == o.uid &&
|
|
125
|
+
cts == o.cts &&
|
|
126
|
+
data == o.data &&
|
|
127
|
+
mid == o.mid &&
|
|
128
|
+
sdid == o.sdid &&
|
|
129
|
+
mv == o.mv &&
|
|
130
|
+
sdtid == o.sdtid &&
|
|
131
|
+
ts == o.ts
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# @see the `==` method
|
|
135
|
+
# @param [Object] Object to be compared
|
|
136
|
+
def eql?(o)
|
|
137
|
+
self == o
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# Calculates hash code according to all attributes.
|
|
141
|
+
# @return [Fixnum] Hash code
|
|
142
|
+
def hash
|
|
143
|
+
[uid, cts, data, mid, sdid, mv, sdtid, ts].hash
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# Builds the object from hash
|
|
147
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
148
|
+
# @return [Object] Returns the model itself
|
|
149
|
+
def build_from_hash(attributes)
|
|
150
|
+
return nil unless attributes.is_a?(Hash)
|
|
151
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
152
|
+
if type =~ /\AArray<(.*)>/i
|
|
153
|
+
# check to ensure the input is an array given that the the attribute
|
|
154
|
+
# is documented as an array but the input is not
|
|
155
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
156
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
|
|
157
|
+
end
|
|
158
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
159
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
160
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
|
161
|
+
end
|
|
162
|
+
|
|
163
|
+
self
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
# Deserializes the data based on type
|
|
167
|
+
# @param string type Data type
|
|
168
|
+
# @param string value Value to be deserialized
|
|
169
|
+
# @return [Object] Deserialized data
|
|
170
|
+
def _deserialize(type, value)
|
|
171
|
+
case type.to_sym
|
|
172
|
+
when :DateTime
|
|
173
|
+
DateTime.parse(value)
|
|
174
|
+
when :Date
|
|
175
|
+
Date.parse(value)
|
|
176
|
+
when :String
|
|
177
|
+
value.to_s
|
|
178
|
+
when :Integer
|
|
179
|
+
value.to_i
|
|
180
|
+
when :Float
|
|
181
|
+
value.to_f
|
|
182
|
+
when :BOOLEAN
|
|
183
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
184
|
+
true
|
|
185
|
+
else
|
|
186
|
+
false
|
|
187
|
+
end
|
|
188
|
+
when :Object
|
|
189
|
+
# generic object (usually a Hash), return directly
|
|
190
|
+
value
|
|
191
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
192
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
193
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
194
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
195
|
+
k_type = Regexp.last_match[:k_type]
|
|
196
|
+
v_type = Regexp.last_match[:v_type]
|
|
197
|
+
{}.tap do |hash|
|
|
198
|
+
value.each do |k, v|
|
|
199
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
200
|
+
end
|
|
201
|
+
end
|
|
202
|
+
else # model
|
|
203
|
+
temp_model = ArtikCloud.const_get(type).new
|
|
204
|
+
temp_model.build_from_hash(value)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the string representation of the object
|
|
209
|
+
# @return [String] String presentation of the object
|
|
210
|
+
def to_s
|
|
211
|
+
to_hash.to_s
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
|
216
|
+
def to_body
|
|
217
|
+
to_hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the object in the form of hash
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_hash
|
|
223
|
+
hash = {}
|
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
225
|
+
value = self.send(attr)
|
|
226
|
+
next if value.nil?
|
|
227
|
+
hash[param] = _to_hash(value)
|
|
228
|
+
end
|
|
229
|
+
hash
|
|
230
|
+
end
|
|
231
|
+
|
|
232
|
+
# Outputs non-array value in the form of hash
|
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
234
|
+
# @param [Object] value Any valid value
|
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
|
236
|
+
def _to_hash(value)
|
|
237
|
+
if value.is_a?(Array)
|
|
238
|
+
value.compact.map{ |v| _to_hash(v) }
|
|
239
|
+
elsif value.is_a?(Hash)
|
|
240
|
+
{}.tap do |hash|
|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
242
|
+
end
|
|
243
|
+
elsif value.respond_to? :to_hash
|
|
244
|
+
value.to_hash
|
|
245
|
+
else
|
|
246
|
+
value
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|