lib/purecloudplatformclientv2/models/management_unit.rb in purecloudplatformclientv2-20.0.0 vs lib/purecloudplatformclientv2/models/management_unit.rb in purecloudplatformclientv2-21.0.0
- old
+ new
@@ -15,29 +15,35 @@
=end
require 'date'
module PureCloud
- # Management Unit object for Workforce Management.
+ # Management Unit object for Workforce Management
class ManagementUnit
# The globally unique identifier for the object.
attr_accessor :id
attr_accessor :name
- # Start day of week for workforce management planning purposes
+ # Start day of week for scheduling and forecasting purposes
attr_accessor :start_day_of_week
# The time zone for the management unit in standard Olson Format (See https://en.wikipedia.org/wiki/Tz_database)
attr_accessor :time_zone
- # The version of the underlying ManagementUnit object. Useful for handling eventual consistency issues. User must submit the current version they of the ManagementUnit in any write requests
+ # The configuration settings for this management unit
+ attr_accessor :settings
+
+ # The version of the underlying entity
attr_accessor :version
- # The date and time at which this management unit was last modified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
+ # The date and time at which this entity was last modified. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss.SSSZ
attr_accessor :date_modified
+ # The user who last modified this entity
+ attr_accessor :modified_by
+
# The URI for this object
attr_accessor :self_uri
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
@@ -49,14 +55,18 @@
:'start_day_of_week' => :'startDayOfWeek',
:'time_zone' => :'timeZone',
+ :'settings' => :'settings',
+
:'version' => :'version',
:'date_modified' => :'dateModified',
+ :'modified_by' => :'modifiedBy',
+
:'self_uri' => :'selfUri'
}
end
@@ -70,14 +80,18 @@
:'start_day_of_week' => :'String',
:'time_zone' => :'String',
+ :'settings' => :'ManagementUnitSettings',
+
:'version' => :'Integer',
:'date_modified' => :'DateTime',
+ :'modified_by' => :'User',
+
:'self_uri' => :'String'
}
end
@@ -124,10 +138,19 @@
end
+ if attributes.has_key?(:'settings')
+
+
+ self.settings = attributes[:'settings']
+
+
+ end
+
+
if attributes.has_key?(:'version')
self.version = attributes[:'version']
@@ -142,10 +165,19 @@
end
+ if attributes.has_key?(:'modifiedBy')
+
+
+ self.modified_by = attributes[:'modifiedBy']
+
+
+ end
+
+
if attributes.has_key?(:'selfUri')
self.self_uri = attributes[:'selfUri']
@@ -176,11 +208,11 @@
- allowed_values = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
+ allowed_values = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
if @start_day_of_week && !allowed_values.include?(@start_day_of_week)
return false
end
@@ -188,10 +220,14 @@
+
+
+
+
if @version.nil?
return false
end
@@ -204,10 +240,14 @@
+
+
+
+
end
@@ -221,11 +261,11 @@
# Custom attribute writer method checking allowed values (enum).
# @param [Object] start_day_of_week Object to be assigned
def start_day_of_week=(start_day_of_week)
- allowed_values = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
+ allowed_values = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
if start_day_of_week && !allowed_values.include?(start_day_of_week)
fail ArgumentError, "invalid value for 'start_day_of_week', must be one of #{allowed_values}."
end
@start_day_of_week = start_day_of_week
end
@@ -251,21 +291,33 @@
+
+
+
+
+
+
+
+
+
+
# 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 &&
name == o.name &&
start_day_of_week == o.start_day_of_week &&
time_zone == o.time_zone &&
+ settings == o.settings &&
version == o.version &&
date_modified == o.date_modified &&
+ modified_by == o.modified_by &&
self_uri == o.self_uri
end
# @see the `==` method
# @param [Object] Object to be compared
@@ -274,10 +326,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [id, name, start_day_of_week, time_zone, version, date_modified, self_uri].hash
+ [id, name, start_day_of_week, time_zone, settings, version, date_modified, modified_by, self_uri].hash
end
# build the object from hash
def build_from_hash(attributes)
return nil unless attributes.is_a?(Hash)