lib/purecloudplatformclientv2/models/voicemail.rb in purecloudplatformclientv2-12.0.0 vs lib/purecloudplatformclientv2/models/voicemail.rb in purecloudplatformclientv2-13.0.0

- old
+ new

@@ -19,25 +19,32 @@ module PureCloud class Voicemail # The voicemail id attr_accessor :id + # current state of the voicemail upload + attr_accessor :upload_status + # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'id' => :'id' + :'id' => :'id', + :'upload_status' => :'uploadStatus' + } end # Attribute type mapping. def self.swagger_types { - :'id' => :'String' + :'id' => :'String', + :'upload_status' => :'String' + } end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -55,10 +62,19 @@ end + if attributes.has_key?(:'uploadStatus') + + + self.upload_status = attributes[:'uploadStatus'] + + + 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 @@ -74,24 +90,48 @@ + + + allowed_values = ["pending", "complete", "failed", "timeout"] + if @upload_status && !allowed_values.include?(@upload_status) + return false + end + + + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] upload_status Object to be assigned + def upload_status=(upload_status) + allowed_values = ["pending", "complete", "failed", "timeout"] + if upload_status && !allowed_values.include?(upload_status) + fail ArgumentError, "invalid value for 'upload_status', must be one of #{allowed_values}." + end + @upload_status = upload_status + 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 && - id == o.id + id == o.id && + upload_status == o.upload_status end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -99,10 +139,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id].hash + [id, upload_status].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash)