Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions generated/activitysmith_openapi/api/live_activities_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down Expand Up @@ -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]
Expand All @@ -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
Expand Down
17 changes: 13 additions & 4 deletions generated/activitysmith_openapi/models/content_state_end.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 13 additions & 4 deletions generated/activitysmith_openapi/models/content_state_start.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 13 additions & 4 deletions generated/activitysmith_openapi/models/content_state_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
17 changes: 13 additions & 4 deletions generated/activitysmith_openapi/models/stream_content_state.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down