lib/purecloudplatformclientv2/models/response_text.rb in purecloudplatformclientv2-8.0.0 vs lib/purecloudplatformclientv2/models/response_text.rb in purecloudplatformclientv2-9.0.0
- old
+ new
@@ -26,20 +26,26 @@
attr_accessor :content_type
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+
:'content' => :'content',
+
:'content_type' => :'contentType'
+
}
end
# Attribute type mapping.
def self.swagger_types
{
+
:'content' => :'String',
+
:'content_type' => :'String'
+
}
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -47,49 +53,83 @@
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
+
if attributes.has_key?(:'content')
+
+
self.content = attributes[:'content']
+
+
end
+
if attributes.has_key?(:'contentType')
+
+
self.content_type = attributes[:'contentType']
+
+
end
+
end
# 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
+
+
return invalid_properties
end
# Check to see if the all the properties in the model are valid
# @return true if the model is valid
def valid?
+
+
if @content.nil?
return false
end
+
+
+
+
+
+
allowed_values = ["text/plain", "text/html"]
if @content_type && !allowed_values.include?(@content_type)
return false
end
+
+
+
end
+
+
+
+
+
+
+
# Custom attribute writer method checking allowed values (enum).
# @param [Object] content_type Object to be assigned
def content_type=(content_type)
allowed_values = ["text/plain", "text/html"]
if content_type && !allowed_values.include?(content_type)
fail ArgumentError, "invalid value for 'content_type', must be one of #{allowed_values}."
end
@content_type = content_type
end
+
+
+
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&