lib/purecloudplatformclientv2/models/message_media.rb in purecloudplatformclientv2-35.0.0 vs lib/purecloudplatformclientv2/models/message_media.rb in purecloudplatformclientv2-36.0.0
- old
+ new
@@ -22,29 +22,50 @@
attr_accessor :url
# The optional internet media type of the the media object. If null then the media type should be dictated by the url
attr_accessor :media_type
+ # The optional content length of the the media object, in bytes.
+ attr_accessor :content_length_bytes
+
+ # The optional name of the the media object.
+ attr_accessor :name
+
+ # The optional id of the the media object.
+ attr_accessor :id
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'url' => :'url',
- :'media_type' => :'mediaType'
+ :'media_type' => :'mediaType',
+ :'content_length_bytes' => :'contentLengthBytes',
+
+ :'name' => :'name',
+
+ :'id' => :'id'
+
}
end
# Attribute type mapping.
def self.swagger_types
{
:'url' => :'String',
- :'media_type' => :'String'
+ :'media_type' => :'String',
+ :'content_length_bytes' => :'Integer',
+
+ :'name' => :'String',
+
+ :'id' => :'String'
+
}
end
# Initializes the object
# @param [Hash] attributes Model attributes in the form of hash
@@ -71,10 +92,37 @@
end
+ if attributes.has_key?(:'contentLengthBytes')
+
+
+ self.content_length_bytes = attributes[:'contentLengthBytes']
+
+
+ end
+
+
+ if attributes.has_key?(:'name')
+
+
+ self.name = attributes[:'name']
+
+
+ end
+
+
+ if attributes.has_key?(:'id')
+
+
+ self.id = attributes[:'id']
+
+
+ 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
@@ -94,10 +142,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
end
@@ -107,17 +167,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
url == o.url &&
- media_type == o.media_type
+ media_type == o.media_type &&
+ content_length_bytes == o.content_length_bytes &&
+ name == o.name &&
+ id == o.id
end
# @see the `==` method
# @param [Object] Object to be compared
def eql?(o)
@@ -125,10 +203,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [url, media_type].hash
+ [url, media_type, content_length_bytes, name, id].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)