lib/purecloudplatformclientv2/models/activity_code.rb in purecloudplatformclientv2-75.1.0 vs lib/purecloudplatformclientv2/models/activity_code.rb in purecloudplatformclientv2-76.0.0

- old
+ new

@@ -20,10 +20,13 @@ # Activity code data class ActivityCode # The globally unique identifier for the object. attr_accessor :id + # The URI for this object + attr_accessor :self_uri + # The name of the activity code. Default activity codes will be created with an empty name attr_accessor :name # Whether this activity code is active or has been deleted attr_accessor :is_active @@ -47,19 +50,18 @@ attr_accessor :agent_time_off_selectable # Version metadata for the associated management unit's list of activity codes attr_accessor :metadata - # The URI for this object - attr_accessor :self_uri - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { :'id' => :'id', + :'self_uri' => :'selfUri', + :'name' => :'name', :'is_active' => :'isActive', :'is_default' => :'isDefault', @@ -72,23 +74,23 @@ :'counts_as_work_time' => :'countsAsWorkTime', :'agent_time_off_selectable' => :'agentTimeOffSelectable', - :'metadata' => :'metadata', + :'metadata' => :'metadata' - :'self_uri' => :'selfUri' - } end # Attribute type mapping. def self.swagger_types { :'id' => :'String', + :'self_uri' => :'String', + :'name' => :'String', :'is_active' => :'BOOLEAN', :'is_default' => :'BOOLEAN', @@ -101,14 +103,12 @@ :'counts_as_work_time' => :'BOOLEAN', :'agent_time_off_selectable' => :'BOOLEAN', - :'metadata' => :'WfmVersionedEntityMetadata', + :'metadata' => :'WfmVersionedEntityMetadata' - :'self_uri' => :'String' - } end # Initializes the object # @param [Hash] attributes Model attributes in the form of hash @@ -126,10 +126,19 @@ end + if attributes.has_key?(:'selfUri') + + + self.self_uri = attributes[:'selfUri'] + + + end + + if attributes.has_key?(:'name') self.name = attributes[:'name'] @@ -207,19 +216,10 @@ end - if attributes.has_key?(:'selfUri') - - - self.self_uri = attributes[:'selfUri'] - - - 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 @@ -249,10 +249,14 @@ + + + + allowed_values = ["OnQueueWork", "Break", "Meal", "Meeting", "OffQueueWork", "TimeOff", "Training", "Unavailable", "Unscheduled"] if @category && !allowed_values.include?(@category) return false end @@ -281,14 +285,10 @@ - - - - end @@ -309,10 +309,15 @@ + + + + + # Custom attribute writer method checking allowed values (enum). # @param [Object] category Object to be assigned def category=(category) allowed_values = ["OnQueueWork", "Break", "Meal", "Meeting", "OffQueueWork", "TimeOff", "Training", "Unavailable", "Unscheduled"] if category && !allowed_values.include?(category) @@ -347,31 +352,26 @@ - - - - - # 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 && + self_uri == o.self_uri && name == o.name && is_active == o.is_active && is_default == o.is_default && category == o.category && length_in_minutes == o.length_in_minutes && counts_as_paid_time == o.counts_as_paid_time && counts_as_work_time == o.counts_as_work_time && agent_time_off_selectable == o.agent_time_off_selectable && - metadata == o.metadata && - self_uri == o.self_uri + metadata == o.metadata end # @see the `==` method # @param [Object] Object to be compared def eql?(o) @@ -379,10 +379,10 @@ end # Calculates hash code according to all attributes. # @return [Fixnum] Hash code def hash - [id, name, is_active, is_default, category, length_in_minutes, counts_as_paid_time, counts_as_work_time, agent_time_off_selectable, metadata, self_uri].hash + [id, self_uri, name, is_active, is_default, category, length_in_minutes, counts_as_paid_time, counts_as_work_time, agent_time_off_selectable, metadata].hash end # build the object from hash def build_from_hash(attributes) return nil unless attributes.is_a?(Hash)