lib/artikcloud/models/normalized_action.rb in artikcloud-2.0.8 vs lib/artikcloud/models/normalized_action.rb in artikcloud-2.1.0
- old
+ new
@@ -1,26 +1,14 @@
=begin
#ARTIK Cloud API
-#No descripton provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
+#No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
=end
require 'date'
module ArtikCloud
@@ -123,10 +111,42 @@
# Show invalid properties with the reasons. Usually used together with valid?
# @return Array for valid properies with the reasons
def list_invalid_properties
invalid_properties = Array.new
+ if @cts.nil?
+ invalid_properties.push("invalid value for 'cts', cts cannot be nil.")
+ end
+
+ if @ts.nil?
+ invalid_properties.push("invalid value for 'ts', ts cannot be nil.")
+ end
+
+ if @mid.nil?
+ invalid_properties.push("invalid value for 'mid', mid cannot be nil.")
+ end
+
+ if @ddid.nil?
+ invalid_properties.push("invalid value for 'ddid', ddid cannot be nil.")
+ end
+
+ if @ddtid.nil?
+ invalid_properties.push("invalid value for 'ddtid', ddtid cannot be nil.")
+ end
+
+ if @uid.nil?
+ invalid_properties.push("invalid value for 'uid', uid cannot be nil.")
+ end
+
+ if @mv.nil?
+ invalid_properties.push("invalid value for 'mv', mv cannot be nil.")
+ end
+
+ if @data.nil?
+ invalid_properties.push("invalid value for 'data', data cannot be nil.")
+ end
+
return invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
@@ -174,11 +194,11 @@
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)
self.class.swagger_types.each_pair do |key, type|
- if type =~ /^Array<(.*)>/i
+ if type =~ /\AArray<(.*)>/i
# check to ensure the input is an array given that the the attribute
# is documented as an array but the input is not
if attributes[self.class.attribute_map[key]].is_a?(Array)
self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
end
@@ -205,21 +225,21 @@
when :Integer
value.to_i
when :Float
value.to_f
when :BOOLEAN
- if value.to_s =~ /^(true|t|yes|y|1)$/i
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
true
else
false
end
when :Object
# generic object (usually a Hash), return directly
value
when /\AArray<(?<inner_type>.+)>\z/
inner_type = Regexp.last_match[:inner_type]
value.map { |v| _deserialize(inner_type, v) }
- when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
k_type = Regexp.last_match[:k_type]
v_type = Regexp.last_match[:v_type]
{}.tap do |hash|
value.each do |k, v|
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)