lib/algolia/models/insights/viewed_object_ids.rb in algolia-3.5.0 vs lib/algolia/models/insights/viewed_object_ids.rb in algolia-3.5.1
- old
+ new
@@ -127,114 +127,9 @@
if attributes.key?(:timestamp)
self.timestamp = attributes[:timestamp]
end
end
- # Custom attribute writer method with validation
- # @param [Object] event_name Value to be assigned
- def event_name=(event_name)
- if event_name.nil?
- raise ArgumentError, "event_name cannot be nil"
- end
-
- if event_name.to_s.length > 64
- raise(
- ArgumentError,
- "invalid value for \"event_name\", the character length must be smaller than or equal to 64."
- )
- end
-
- if event_name.to_s.length < 1
- raise(
- ArgumentError,
- "invalid value for \"event_name\", the character length must be great than or equal to 1."
- )
- end
-
- pattern = /[\x20-\x7E]{1,64}/
- if event_name !~ pattern
- raise ArgumentError, "invalid value for \"event_name\", must conform to the pattern #{pattern}."
- end
-
- @event_name = event_name
- end
-
- # Custom attribute writer method with validation
- # @param [Object] object_ids Value to be assigned
- def object_ids=(object_ids)
- if object_ids.nil?
- raise ArgumentError, "object_ids cannot be nil"
- end
-
- if object_ids.length > 20
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be less than or equal to 20."
- end
-
- if object_ids.length < 1
- raise ArgumentError, "invalid value for \"object_ids\", number of items must be greater than or equal to 1."
- end
-
- @object_ids = object_ids
- end
-
- # Custom attribute writer method with validation
- # @param [Object] user_token Value to be assigned
- def user_token=(user_token)
- if user_token.nil?
- raise ArgumentError, "user_token cannot be nil"
- end
-
- if user_token.to_s.length > 129
- raise(
- ArgumentError,
- "invalid value for \"user_token\", the character length must be smaller than or equal to 129."
- )
- end
-
- if user_token.to_s.length < 1
- raise(
- ArgumentError,
- "invalid value for \"user_token\", the character length must be great than or equal to 1."
- )
- end
-
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
- if user_token !~ pattern
- raise ArgumentError, "invalid value for \"user_token\", must conform to the pattern #{pattern}."
- end
-
- @user_token = user_token
- end
-
- # Custom attribute writer method with validation
- # @param [Object] authenticated_user_token Value to be assigned
- def authenticated_user_token=(authenticated_user_token)
- if authenticated_user_token.nil?
- raise ArgumentError, "authenticated_user_token cannot be nil"
- end
-
- if authenticated_user_token.to_s.length > 129
- raise(
- ArgumentError,
- "invalid value for \"authenticated_user_token\", the character length must be smaller than or equal to 129."
- )
- end
-
- if authenticated_user_token.to_s.length < 1
- raise(
- ArgumentError,
- "invalid value for \"authenticated_user_token\", the character length must be great than or equal to 1."
- )
- end
-
- pattern = /[a-zA-Z0-9_=\/+-]{1,129}/
- if authenticated_user_token !~ pattern
- raise ArgumentError, "invalid value for \"authenticated_user_token\", must conform to the pattern #{pattern}."
- end
-
- @authenticated_user_token = authenticated_user_token
- end
-
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(other)
return true if self.equal?(other)
self.class == other.class &&