diff --git a/generated/activitysmith_openapi/api/live_activities_api.rb b/generated/activitysmith_openapi/api/live_activities_api.rb index bf6c116..9ba1713 100644 --- a/generated/activitysmith_openapi/api/live_activities_api.rb +++ b/generated/activitysmith_openapi/api/live_activities_api.rb @@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default) @api_client = api_client end # End a Live Activity - # Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. + # Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, and stats activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. # @param live_activity_end_request [LiveActivityEndRequest] # @param [Hash] opts the optional parameters # @return [LiveActivityEndResponse] @@ -30,7 +30,7 @@ def end_live_activity(live_activity_end_request, opts = {}) end # End a Live Activity - # Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. + # Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, and stats activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. # @param live_activity_end_request [LiveActivityEndRequest] # @param [Hash] opts the optional parameters # @return [Array<(LiveActivityEndResponse, Integer, Hash)>] LiveActivityEndResponse data, response status code and response headers @@ -250,7 +250,7 @@ def reconcile_live_activity_stream_with_http_info(stream_key, live_activity_stre end # Start a Live Activity - # Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. + # Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, and stats activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. # @param live_activity_start_request [LiveActivityStartRequest] # @param [Hash] opts the optional parameters # @return [LiveActivityStartResponse] @@ -260,7 +260,7 @@ def start_live_activity(live_activity_start_request, opts = {}) end # Start a Live Activity - # Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. + # Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, and stats activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. # @param live_activity_start_request [LiveActivityStartRequest] # @param [Hash] opts the optional parameters # @return [Array<(LiveActivityStartResponse, Integer, Hash)>] LiveActivityStartResponse data, response status code and response headers @@ -318,7 +318,7 @@ def start_live_activity_with_http_info(live_activity_start_request, opts = {}) end # Update a Live Activity - # Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. + # Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, and stats activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. # @param live_activity_update_request [LiveActivityUpdateRequest] # @param [Hash] opts the optional parameters # @return [LiveActivityUpdateResponse] @@ -328,7 +328,7 @@ def update_live_activity(live_activity_update_request, opts = {}) end # Update a Live Activity - # Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, and metrics activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. + # Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, and stats activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. # @param live_activity_update_request [LiveActivityUpdateRequest] # @param [Hash] opts the optional parameters # @return [Array<(LiveActivityUpdateResponse, Integer, Hash)>] LiveActivityUpdateResponse data, response status code and response headers diff --git a/generated/activitysmith_openapi/models/content_state_end.rb b/generated/activitysmith_openapi/models/content_state_end.rb index c4b6b99..6edc4df 100644 --- a/generated/activitysmith_openapi/models/content_state_end.rb +++ b/generated/activitysmith_openapi/models/content_state_end.rb @@ -14,7 +14,7 @@ require 'time' module OpenapiClient - # End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics include a non-empty metrics array. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start. + # End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start. class ContentStateEnd attr_accessor :title @@ -35,7 +35,7 @@ class ContentStateEnd # Maximum progress value. Use with value for type=progress. attr_accessor :upper_limit - # Use for type=metrics. + # Use for type=metrics or type=stats. attr_accessor :metrics # Optional. When omitted, the API uses the existing Live Activity type. @@ -227,6 +227,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.') end + if !@metrics.nil? && @metrics.length > 8 + invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.') + end + if !@metrics.nil? && @metrics.length < 1 invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.') end @@ -247,8 +251,9 @@ def valid? return false if !@current_step.nil? && @current_step < 1 return false if !@percentage.nil? && @percentage > 100 return false if !@percentage.nil? && @percentage < 0 + return false if !@metrics.nil? && @metrics.length > 8 return false if !@metrics.nil? && @metrics.length < 1 - type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) return false unless type_validator.valid?(@type) color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"]) return false unless color_validator.valid?(@color) @@ -311,6 +316,10 @@ def metrics=(metrics) fail ArgumentError, 'metrics cannot be nil' end + if metrics.length > 8 + fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.' + end + if metrics.length < 1 fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.' end @@ -321,7 +330,7 @@ def metrics=(metrics) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/generated/activitysmith_openapi/models/content_state_start.rb b/generated/activitysmith_openapi/models/content_state_start.rb index 589dc77..1ad141a 100644 --- a/generated/activitysmith_openapi/models/content_state_start.rb +++ b/generated/activitysmith_openapi/models/content_state_start.rb @@ -14,7 +14,7 @@ require 'time' module OpenapiClient - # Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics include a non-empty metrics array. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls. + # Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls. class ContentStateStart attr_accessor :title @@ -35,7 +35,7 @@ class ContentStateStart # Maximum progress value. Use with value for type=progress. attr_accessor :upper_limit - # Use for type=metrics. + # Use for type=metrics or type=stats. attr_accessor :metrics attr_accessor :type @@ -217,6 +217,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.') end + if !@metrics.nil? && @metrics.length > 8 + invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.') + end + if !@metrics.nil? && @metrics.length < 1 invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.') end @@ -237,9 +241,10 @@ def valid? return false if !@current_step.nil? && @current_step < 1 return false if !@percentage.nil? && @percentage > 100 return false if !@percentage.nil? && @percentage < 0 + return false if !@metrics.nil? && @metrics.length > 8 return false if !@metrics.nil? && @metrics.length < 1 return false if @type.nil? - type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) return false unless type_validator.valid?(@type) color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"]) return false unless color_validator.valid?(@color) @@ -301,6 +306,10 @@ def metrics=(metrics) fail ArgumentError, 'metrics cannot be nil' end + if metrics.length > 8 + fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.' + end + if metrics.length < 1 fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.' end @@ -311,7 +320,7 @@ def metrics=(metrics) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/generated/activitysmith_openapi/models/content_state_update.rb b/generated/activitysmith_openapi/models/content_state_update.rb index 73cdc07..be4fd7c 100644 --- a/generated/activitysmith_openapi/models/content_state_update.rb +++ b/generated/activitysmith_openapi/models/content_state_update.rb @@ -14,7 +14,7 @@ require 'time' module OpenapiClient - # Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics include a non-empty metrics array. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates. + # Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates. class ContentStateUpdate attr_accessor :title @@ -35,7 +35,7 @@ class ContentStateUpdate # Maximum progress value. Use with value for type=progress. attr_accessor :upper_limit - # Use for type=metrics. + # Use for type=metrics or type=stats. attr_accessor :metrics # Optional. When omitted, the API uses the existing Live Activity type. @@ -216,6 +216,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.') end + if !@metrics.nil? && @metrics.length > 8 + invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.') + end + if !@metrics.nil? && @metrics.length < 1 invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.') end @@ -232,8 +236,9 @@ def valid? return false if !@current_step.nil? && @current_step < 1 return false if !@percentage.nil? && @percentage > 100 return false if !@percentage.nil? && @percentage < 0 + return false if !@metrics.nil? && @metrics.length > 8 return false if !@metrics.nil? && @metrics.length < 1 - type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) return false unless type_validator.valid?(@type) color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"]) return false unless color_validator.valid?(@color) @@ -295,6 +300,10 @@ def metrics=(metrics) fail ArgumentError, 'metrics cannot be nil' end + if metrics.length > 8 + fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.' + end + if metrics.length < 1 fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.' end @@ -305,7 +314,7 @@ def metrics=(metrics) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end diff --git a/generated/activitysmith_openapi/models/metric_value_update_request.rb b/generated/activitysmith_openapi/models/metric_value_update_request.rb index 41fb1a5..418170c 100644 --- a/generated/activitysmith_openapi/models/metric_value_update_request.rb +++ b/generated/activitysmith_openapi/models/metric_value_update_request.rb @@ -18,14 +18,10 @@ module OpenapiClient class MetricValueUpdateRequest attr_accessor :value - # Optional ISO timestamp for when the metric value was measured. Defaults to the server receive time. - attr_accessor :timestamp - # Attribute mapping from ruby-style variable name to JSON key. def self.attribute_map { - :'value' => :'value', - :'timestamp' => :'timestamp' + :'value' => :'value' } end @@ -37,8 +33,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { - :'value' => :'MetricValueUpdateRequestValue', - :'timestamp' => :'Time' + :'value' => :'MetricValueUpdateRequestValue' } end @@ -68,10 +63,6 @@ def initialize(attributes = {}) else self.value = nil end - - if attributes.key?(:'timestamp') - self.timestamp = attributes[:'timestamp'] - end end # Show invalid properties with the reasons. Usually used together with valid? @@ -99,8 +90,7 @@ def valid? def ==(o) return true if self.equal?(o) self.class == o.class && - value == o.value && - timestamp == o.timestamp + value == o.value end # @see the `==` method @@ -112,7 +102,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [value, timestamp].hash + [value].hash end # Builds the object from hash diff --git a/generated/activitysmith_openapi/models/stream_content_state.rb b/generated/activitysmith_openapi/models/stream_content_state.rb index fd00db5..a03569f 100644 --- a/generated/activitysmith_openapi/models/stream_content_state.rb +++ b/generated/activitysmith_openapi/models/stream_content_state.rb @@ -14,7 +14,7 @@ require 'time' module OpenapiClient - # Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, and metrics types. + # Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, and stats types. class StreamContentState attr_accessor :title @@ -47,7 +47,7 @@ class StreamContentState # Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. attr_accessor :step_colors - # Use for metrics activities. + # Use for metrics and stats activities. attr_accessor :metrics # Optional. Seconds before the ended Live Activity is dismissed. @@ -234,6 +234,10 @@ def list_invalid_properties invalid_properties.push('invalid value for "percentage", must be greater than or equal to 0.') end + if !@metrics.nil? && @metrics.length > 8 + invalid_properties.push('invalid value for "metrics", number of items must be less than or equal to 8.') + end + if !@metrics.nil? && @metrics.length < 1 invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.') end @@ -258,12 +262,13 @@ def valid? return false if !@current_step.nil? && @current_step < 1 return false if !@percentage.nil? && @percentage > 100 return false if !@percentage.nil? && @percentage < 0 - type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) return false unless type_validator.valid?(@type) color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"]) return false unless color_validator.valid?(@color) step_color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"]) return false unless step_color_validator.valid?(@step_color) + return false if !@metrics.nil? && @metrics.length > 8 return false if !@metrics.nil? && @metrics.length < 1 return false if !@auto_dismiss_seconds.nil? && @auto_dismiss_seconds < 0 return false if !@auto_dismiss_minutes.nil? && @auto_dismiss_minutes < 0 @@ -319,7 +324,7 @@ def percentage=(percentage) # Custom attribute writer method checking allowed values (enum). # @param [Object] type Object to be assigned def type=(type) - validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics"]) + validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"]) unless validator.valid?(type) fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." end @@ -353,6 +358,10 @@ def metrics=(metrics) fail ArgumentError, 'metrics cannot be nil' end + if metrics.length > 8 + fail ArgumentError, 'invalid value for "metrics", number of items must be less than or equal to 8.' + end + if metrics.length < 1 fail ArgumentError, 'invalid value for "metrics", number of items must be greater than or equal to 1.' end