twilio-api-sdk 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE +28 -0
- data/README.md +213 -0
- data/bin/console +15 -0
- data/lib/twilio_ap_is/api_helper.rb +10 -0
- data/lib/twilio_ap_is/apis/accounts_v1_auth_token_promotion_api.rb +27 -0
- data/lib/twilio_ap_is/apis/accounts_v1_aws_api.rb +137 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_consents_api.rb +41 -0
- data/lib/twilio_ap_is/apis/accounts_v1_bulk_contacts_api.rb +36 -0
- data/lib/twilio_ap_is/apis/accounts_v1_messaging_geopermissions_api.rb +54 -0
- data/lib/twilio_ap_is/apis/accounts_v1_public_key_api.rb +136 -0
- data/lib/twilio_ap_is/apis/accounts_v1_safelist_api.rb +69 -0
- data/lib/twilio_ap_is/apis/accounts_v1_secondary_auth_token_api.rb +39 -0
- data/lib/twilio_ap_is/apis/base_api.rb +67 -0
- data/lib/twilio_ap_is/apis/chat_v3_channel_api.rb +51 -0
- data/lib/twilio_ap_is/apis/conversations_v1_address_configuration_api.rb +218 -0
- data/lib/twilio_ap_is/apis/conversations_v1_binding_api.rb +116 -0
- data/lib/twilio_ap_is/apis/conversations_v1_configuration_api.rb +133 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_api.rb +550 -0
- data/lib/twilio_ap_is/apis/conversations_v1_conversation_with_participants_api.rb +182 -0
- data/lib/twilio_ap_is/apis/conversations_v1_credential_api.rb +189 -0
- data/lib/twilio_ap_is/apis/conversations_v1_delivery_receipt_api.rb +183 -0
- data/lib/twilio_ap_is/apis/conversations_v1_message_api.rb +497 -0
- data/lib/twilio_ap_is/apis/conversations_v1_notification_api.rb +124 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_api.rb +546 -0
- data/lib/twilio_ap_is/apis/conversations_v1_participant_conversation_api.rb +99 -0
- data/lib/twilio_ap_is/apis/conversations_v1_role_api.rb +325 -0
- data/lib/twilio_ap_is/apis/conversations_v1_service_api.rb +98 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_api.rb +364 -0
- data/lib/twilio_ap_is/apis/conversations_v1_user_conversation_api.rb +335 -0
- data/lib/twilio_ap_is/apis/conversations_v1_webhook_api.rb +561 -0
- data/lib/twilio_ap_is/apis/notify_v1_binding_api.rb +186 -0
- data/lib/twilio_ap_is/apis/notify_v1_credential_api.rb +183 -0
- data/lib/twilio_ap_is/apis/notify_v1_notification_api.rb +174 -0
- data/lib/twilio_ap_is/apis/notify_v1_service_api.rb +262 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_activity_api.rb +177 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_event_api.rb +125 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_api.rb +310 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_channel_api.rb +173 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_bulk_real_time_statistics_api.rb +36 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_cumulative_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queue_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_queues_statistics_api.rb +72 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_task_reservation_api.rb +396 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_api.rb +232 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_channel_api.rb +126 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_reservation_api.rb +385 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_worker_statistics_api.rb +57 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_cumulative_statistics_api.rb +51 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workers_statistics_api.rb +63 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_api.rb +213 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_cumulative_statistics_api.rb +68 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_real_time_statistics_api.rb +41 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workflow_statistics_api.rb +67 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_api.rb +225 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_cumulative_statistics_api.rb +62 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_real_time_statistics_api.rb +35 -0
- data/lib/twilio_ap_is/apis/taskrouter_v1_workspace_statistics_api.rb +61 -0
- data/lib/twilio_ap_is/apis/verify_v2_service_api.rb +178 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_api.rb +143 -0
- data/lib/twilio_ap_is/apis/verify_v2_verification_check_api.rb +61 -0
- data/lib/twilio_ap_is/client.rb +417 -0
- data/lib/twilio_ap_is/configuration.rb +187 -0
- data/lib/twilio_ap_is/exceptions/api_exception.rb +21 -0
- data/lib/twilio_ap_is/exceptions/v2_services_verifications429_error_exception.rb +63 -0
- data/lib/twilio_ap_is/http/api_response.rb +19 -0
- data/lib/twilio_ap_is/http/auth/basic_auth.rb +62 -0
- data/lib/twilio_ap_is/http/http_call_back.rb +10 -0
- data/lib/twilio_ap_is/http/http_method_enum.rb +10 -0
- data/lib/twilio_ap_is/http/http_request.rb +10 -0
- data/lib/twilio_ap_is/http/http_response.rb +10 -0
- data/lib/twilio_ap_is/http/proxy_settings.rb +22 -0
- data/lib/twilio_ap_is/logging/configuration/api_logging_configuration.rb +186 -0
- data/lib/twilio_ap_is/logging/sdk_logger.rb +17 -0
- data/lib/twilio_ap_is/models/access_token.rb +188 -0
- data/lib/twilio_ap_is/models/access_token_enum_factor_types.rb +26 -0
- data/lib/twilio_ap_is/models/activity.rb +189 -0
- data/lib/twilio_ap_is/models/auth_token_promotion.rb +142 -0
- data/lib/twilio_ap_is/models/base_model.rb +110 -0
- data/lib/twilio_ap_is/models/binding.rb +269 -0
- data/lib/twilio_ap_is/models/binding_binding_type.rb +53 -0
- data/lib/twilio_ap_is/models/bucket.rb +186 -0
- data/lib/twilio_ap_is/models/bulk_consents.rb +83 -0
- data/lib/twilio_ap_is/models/bulk_contacts.rb +83 -0
- data/lib/twilio_ap_is/models/challenge.rb +317 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_reasons.rb +41 -0
- data/lib/twilio_ap_is/models/challenge_enum_challenge_statuses.rb +45 -0
- data/lib/twilio_ap_is/models/challenge_enum_factor_types.rb +41 -0
- data/lib/twilio_ap_is/models/channel.rb +249 -0
- data/lib/twilio_ap_is/models/channel_channel_type.rb +36 -0
- data/lib/twilio_ap_is/models/channel_webhook_enabled_type.rb +36 -0
- data/lib/twilio_ap_is/models/configuration.rb +164 -0
- data/lib/twilio_ap_is/models/configuration_address.rb +199 -0
- data/lib/twilio_ap_is/models/configuration_address_auto_creation_type.rb +40 -0
- data/lib/twilio_ap_is/models/configuration_address_method.rb +36 -0
- data/lib/twilio_ap_is/models/configuration_address_type.rb +60 -0
- data/lib/twilio_ap_is/models/configuration_webhook.rb +154 -0
- data/lib/twilio_ap_is/models/configuration_webhook_method.rb +46 -0
- data/lib/twilio_ap_is/models/configuration_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_message.rb +268 -0
- data/lib/twilio_ap_is/models/conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt.rb +219 -0
- data/lib/twilio_ap_is/models/conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/conversation_participant.rb +240 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook.rb +178 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/conversation_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/conversation_webhook_target.rb +37 -0
- data/lib/twilio_ap_is/models/conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/credential.rb +175 -0
- data/lib/twilio_ap_is/models/credential1.rb +174 -0
- data/lib/twilio_ap_is/models/credential_aws.rb +153 -0
- data/lib/twilio_ap_is/models/credential_public_key.rb +153 -0
- data/lib/twilio_ap_is/models/credential_push_type.rb +41 -0
- data/lib/twilio_ap_is/models/entity.rb +177 -0
- data/lib/twilio_ap_is/models/event.rb +270 -0
- data/lib/twilio_ap_is/models/factor.rb +235 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/factor_enum_factor_type.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/form_enum_form_types.rb +26 -0
- data/lib/twilio_ap_is/models/list_activity_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_configuration_address_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_aws_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_public_key_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_credential_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_event_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_binding_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_receipt_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_service_conversation_message_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_participant_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_conversation_scoped_webhook_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_participant_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_role_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_service_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queue_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_queues_statistics_response.rb +95 -0
- data/lib/twilio_ap_is/models/list_task_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_task_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_conversation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_user_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_channel_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_reservation_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_worker_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workflow_response.rb +94 -0
- data/lib/twilio_ap_is/models/list_workspace_response.rb +94 -0
- data/lib/twilio_ap_is/models/messaging_configuration.rb +170 -0
- data/lib/twilio_ap_is/models/meta.rb +140 -0
- data/lib/twilio_ap_is/models/msg_geopermissions.rb +86 -0
- data/lib/twilio_ap_is/models/new_factor.rb +277 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_statuses.rb +36 -0
- data/lib/twilio_ap_is/models/new_factor_enum_factor_types.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_notification_platforms.rb +40 -0
- data/lib/twilio_ap_is/models/new_factor_enum_totp_algorithms.rb +40 -0
- data/lib/twilio_ap_is/models/notif_priority.rb +43 -0
- data/lib/twilio_ap_is/models/notification.rb +363 -0
- data/lib/twilio_ap_is/models/notification1.rb +181 -0
- data/lib/twilio_ap_is/models/participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/rate_limit.rb +189 -0
- data/lib/twilio_ap_is/models/role.rb +192 -0
- data/lib/twilio_ap_is/models/role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/safelist.rb +88 -0
- data/lib/twilio_ap_is/models/safelist1.rb +99 -0
- data/lib/twilio_ap_is/models/secondary_auth_token.rb +145 -0
- data/lib/twilio_ap_is/models/service.rb +164 -0
- data/lib/twilio_ap_is/models/service1.rb +380 -0
- data/lib/twilio_ap_is/models/service2.rb +350 -0
- data/lib/twilio_ap_is/models/service_binding.rb +226 -0
- data/lib/twilio_ap_is/models/service_binding_binding_type.rb +47 -0
- data/lib/twilio_ap_is/models/service_configuration.rb +180 -0
- data/lib/twilio_ap_is/models/service_conversation.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_message.rb +282 -0
- data/lib/twilio_ap_is/models/service_conversation_message_order_type.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt.rb +233 -0
- data/lib/twilio_ap_is/models/service_conversation_message_receipt_delivery_status.rb +49 -0
- data/lib/twilio_ap_is/models/service_conversation_participant.rb +256 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook.rb +191 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_method.rb +36 -0
- data/lib/twilio_ap_is/models/service_conversation_scoped_webhook_target.rb +40 -0
- data/lib/twilio_ap_is/models/service_conversation_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants.rb +264 -0
- data/lib/twilio_ap_is/models/service_conversation_with_participants_state.rb +45 -0
- data/lib/twilio_ap_is/models/service_notification.rb +155 -0
- data/lib/twilio_ap_is/models/service_participant_conversation.rb +325 -0
- data/lib/twilio_ap_is/models/service_participant_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_role.rb +192 -0
- data/lib/twilio_ap_is/models/service_role_role_type.rb +40 -0
- data/lib/twilio_ap_is/models/service_stats_conversations_rate_limiting_errors_source.rb +36 -0
- data/lib/twilio_ap_is/models/service_user.rb +250 -0
- data/lib/twilio_ap_is/models/service_user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/service_user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/service_user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration.rb +160 -0
- data/lib/twilio_ap_is/models/service_webhook_configuration_method.rb +37 -0
- data/lib/twilio_ap_is/models/stats_twilsock_rate_limiting_errors_source.rb +26 -0
- data/lib/twilio_ap_is/models/task_channel.rb +204 -0
- data/lib/twilio_ap_is/models/task_queue.rb +278 -0
- data/lib/twilio_ap_is/models/task_queue_bulk_real_time_statistics.rb +141 -0
- data/lib/twilio_ap_is/models/task_queue_cumulative.rb +356 -0
- data/lib/twilio_ap_is/models/task_queue_real_time_statistics.rb +250 -0
- data/lib/twilio_ap_is/models/task_queue_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/task_queue_task_order.rb +40 -0
- data/lib/twilio_ap_is/models/task_queues_stats.rb +124 -0
- data/lib/twilio_ap_is/models/task_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/task_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/task_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/task_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/task_reservation_supervisor_mode.rb +40 -0
- data/lib/twilio_ap_is/models/task_router_task.rb +394 -0
- data/lib/twilio_ap_is/models/task_status.rb +53 -0
- data/lib/twilio_ap_is/models/user.rb +250 -0
- data/lib/twilio_ap_is/models/user_binding_binding_type.rb +52 -0
- data/lib/twilio_ap_is/models/user_conversation.rb +317 -0
- data/lib/twilio_ap_is/models/user_conversation_notification_level.rb +37 -0
- data/lib/twilio_ap_is/models/user_conversation_state.rb +41 -0
- data/lib/twilio_ap_is/models/v2_form.rb +112 -0
- data/lib/twilio_ap_is/models/verification.rb +262 -0
- data/lib/twilio_ap_is/models/verification_attempt.rb +219 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_attempt_status.rb +40 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_call_status.rb +60 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_channels.rb +49 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_conversion_status.rb +38 -0
- data/lib/twilio_ap_is/models/verification_attempt_enum_message_status.rb +80 -0
- data/lib/twilio_ap_is/models/verification_attempts.rb +129 -0
- data/lib/twilio_ap_is/models/verification_attempts_summary_enum_channels.rb +48 -0
- data/lib/twilio_ap_is/models/verification_check.rb +231 -0
- data/lib/twilio_ap_is/models/verification_check_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_channel.rb +50 -0
- data/lib/twilio_ap_is/models/verification_enum_risk_check.rb +39 -0
- data/lib/twilio_ap_is/models/verification_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/verification_template.rb +126 -0
- data/lib/twilio_ap_is/models/webhook.rb +222 -0
- data/lib/twilio_ap_is/models/webhook_enum_status.rb +37 -0
- data/lib/twilio_ap_is/models/webhook_enum_version.rb +37 -0
- data/lib/twilio_ap_is/models/worker.rb +247 -0
- data/lib/twilio_ap_is/models/worker_channel.rb +244 -0
- data/lib/twilio_ap_is/models/worker_instance_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/worker_reservation.rb +210 -0
- data/lib/twilio_ap_is/models/worker_reservation_call_status.rb +44 -0
- data/lib/twilio_ap_is/models/worker_reservation_conference_event.rb +56 -0
- data/lib/twilio_ap_is/models/worker_reservation_status.rb +61 -0
- data/lib/twilio_ap_is/models/worker_statistics.rb +122 -0
- data/lib/twilio_ap_is/models/workers_cumulative_statistics.rb +221 -0
- data/lib/twilio_ap_is/models/workers_real_time_statistics.rb +124 -0
- data/lib/twilio_ap_is/models/workflow.rb +247 -0
- data/lib/twilio_ap_is/models/workflow_cumulative_statistics.rb +347 -0
- data/lib/twilio_ap_is/models/workflow_real_time_statistics.rb +173 -0
- data/lib/twilio_ap_is/models/workflow_statistics.rb +135 -0
- data/lib/twilio_ap_is/models/workspace.rb +285 -0
- data/lib/twilio_ap_is/models/workspace_cumulative_statistics.rb +334 -0
- data/lib/twilio_ap_is/models/workspace_queue_order.rb +40 -0
- data/lib/twilio_ap_is/models/workspace_real_time_statistics.rb +185 -0
- data/lib/twilio_ap_is/models/workspace_statistics.rb +122 -0
- data/lib/twilio_ap_is/utilities/date_time_helper.rb +11 -0
- data/lib/twilio_ap_is/utilities/file_wrapper.rb +28 -0
- data/lib/twilio_ap_is.rb +326 -0
- metadata +361 -0
|
@@ -0,0 +1,356 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
require 'date'
|
|
7
|
+
module TwilioApIs
|
|
8
|
+
# TaskQueueCumulative Model.
|
|
9
|
+
class TaskQueueCumulative < BaseModel
|
|
10
|
+
SKIP = Object.new
|
|
11
|
+
private_constant :SKIP
|
|
12
|
+
|
|
13
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
14
|
+
# created the TaskQueue resource.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :account_sid
|
|
17
|
+
|
|
18
|
+
# The average time in seconds between Task creation and acceptance.
|
|
19
|
+
# @return [Integer]
|
|
20
|
+
attr_accessor :avg_task_acceptance_time
|
|
21
|
+
|
|
22
|
+
# The beginning of the interval during which these statistics were
|
|
23
|
+
# calculated, in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
24
|
+
# @return [DateTime]
|
|
25
|
+
attr_accessor :start_time
|
|
26
|
+
|
|
27
|
+
# The end of the interval during which these statistics were calculated, in
|
|
28
|
+
# [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format.
|
|
29
|
+
# @return [DateTime]
|
|
30
|
+
attr_accessor :end_time
|
|
31
|
+
|
|
32
|
+
# The total number of Reservations created for Tasks in the TaskQueue.
|
|
33
|
+
# @return [Integer]
|
|
34
|
+
attr_accessor :reservations_created
|
|
35
|
+
|
|
36
|
+
# The total number of Reservations accepted for Tasks in the TaskQueue.
|
|
37
|
+
# @return [Integer]
|
|
38
|
+
attr_accessor :reservations_accepted
|
|
39
|
+
|
|
40
|
+
# The total number of Reservations rejected for Tasks in the TaskQueue.
|
|
41
|
+
# @return [Integer]
|
|
42
|
+
attr_accessor :reservations_rejected
|
|
43
|
+
|
|
44
|
+
# The total number of Reservations that timed out for Tasks in the
|
|
45
|
+
# TaskQueue.
|
|
46
|
+
# @return [Integer]
|
|
47
|
+
attr_accessor :reservations_timed_out
|
|
48
|
+
|
|
49
|
+
# The total number of Reservations canceled for Tasks in the TaskQueue.
|
|
50
|
+
# @return [Integer]
|
|
51
|
+
attr_accessor :reservations_canceled
|
|
52
|
+
|
|
53
|
+
# The total number of Reservations rescinded.
|
|
54
|
+
# @return [Integer]
|
|
55
|
+
attr_accessor :reservations_rescinded
|
|
56
|
+
|
|
57
|
+
# A list of objects that describe the number of Tasks canceled and
|
|
58
|
+
# reservations accepted above and below the thresholds specified in seconds.
|
|
59
|
+
# @return [Object]
|
|
60
|
+
attr_accessor :split_by_wait_time
|
|
61
|
+
|
|
62
|
+
# The SID of the TaskQueue from which these statistics were calculated.
|
|
63
|
+
# @return [String]
|
|
64
|
+
attr_accessor :task_queue_sid
|
|
65
|
+
|
|
66
|
+
# The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks
|
|
67
|
+
# accepted while in the TaskQueue. Calculation is based on the time when the
|
|
68
|
+
# Tasks were created. For transfers, the wait duration is counted from the
|
|
69
|
+
# moment ***the Task was created***, and not from when the transfer was
|
|
70
|
+
# initiated.
|
|
71
|
+
# @return [Object]
|
|
72
|
+
attr_accessor :wait_duration_until_accepted
|
|
73
|
+
|
|
74
|
+
# The wait duration statistics (`avg`, `min`, `max`, `total`) for Tasks
|
|
75
|
+
# canceled while in the TaskQueue.
|
|
76
|
+
# @return [Object]
|
|
77
|
+
attr_accessor :wait_duration_until_canceled
|
|
78
|
+
|
|
79
|
+
# The relative wait duration statistics (`avg`, `min`, `max`, `total`) for
|
|
80
|
+
# Tasks accepted while in the TaskQueue. Calculation is based on the time
|
|
81
|
+
# when the Tasks entered the TaskQueue.
|
|
82
|
+
# @return [Object]
|
|
83
|
+
attr_accessor :wait_duration_in_queue_until_accepted
|
|
84
|
+
|
|
85
|
+
# The total number of Tasks canceled in the TaskQueue.
|
|
86
|
+
# @return [Integer]
|
|
87
|
+
attr_accessor :tasks_canceled
|
|
88
|
+
|
|
89
|
+
# The total number of Tasks completed in the TaskQueue.
|
|
90
|
+
# @return [Integer]
|
|
91
|
+
attr_accessor :tasks_completed
|
|
92
|
+
|
|
93
|
+
# The total number of Tasks deleted in the TaskQueue.
|
|
94
|
+
# @return [Integer]
|
|
95
|
+
attr_accessor :tasks_deleted
|
|
96
|
+
|
|
97
|
+
# The total number of Tasks entered into the TaskQueue.
|
|
98
|
+
# @return [Integer]
|
|
99
|
+
attr_accessor :tasks_entered
|
|
100
|
+
|
|
101
|
+
# The total number of Tasks that were moved from one queue to another.
|
|
102
|
+
# @return [Integer]
|
|
103
|
+
attr_accessor :tasks_moved
|
|
104
|
+
|
|
105
|
+
# The SID of the Workspace that contains the TaskQueue.
|
|
106
|
+
# @return [String]
|
|
107
|
+
attr_accessor :workspace_sid
|
|
108
|
+
|
|
109
|
+
# The absolute URL of the TaskQueue statistics resource.
|
|
110
|
+
# @return [String]
|
|
111
|
+
attr_accessor :url
|
|
112
|
+
|
|
113
|
+
# A mapping from model property names to API property names.
|
|
114
|
+
def self.names
|
|
115
|
+
@_hash = {} if @_hash.nil?
|
|
116
|
+
@_hash['account_sid'] = 'account_sid'
|
|
117
|
+
@_hash['avg_task_acceptance_time'] = 'avg_task_acceptance_time'
|
|
118
|
+
@_hash['start_time'] = 'start_time'
|
|
119
|
+
@_hash['end_time'] = 'end_time'
|
|
120
|
+
@_hash['reservations_created'] = 'reservations_created'
|
|
121
|
+
@_hash['reservations_accepted'] = 'reservations_accepted'
|
|
122
|
+
@_hash['reservations_rejected'] = 'reservations_rejected'
|
|
123
|
+
@_hash['reservations_timed_out'] = 'reservations_timed_out'
|
|
124
|
+
@_hash['reservations_canceled'] = 'reservations_canceled'
|
|
125
|
+
@_hash['reservations_rescinded'] = 'reservations_rescinded'
|
|
126
|
+
@_hash['split_by_wait_time'] = 'split_by_wait_time'
|
|
127
|
+
@_hash['task_queue_sid'] = 'task_queue_sid'
|
|
128
|
+
@_hash['wait_duration_until_accepted'] = 'wait_duration_until_accepted'
|
|
129
|
+
@_hash['wait_duration_until_canceled'] = 'wait_duration_until_canceled'
|
|
130
|
+
@_hash['wait_duration_in_queue_until_accepted'] =
|
|
131
|
+
'wait_duration_in_queue_until_accepted'
|
|
132
|
+
@_hash['tasks_canceled'] = 'tasks_canceled'
|
|
133
|
+
@_hash['tasks_completed'] = 'tasks_completed'
|
|
134
|
+
@_hash['tasks_deleted'] = 'tasks_deleted'
|
|
135
|
+
@_hash['tasks_entered'] = 'tasks_entered'
|
|
136
|
+
@_hash['tasks_moved'] = 'tasks_moved'
|
|
137
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
138
|
+
@_hash['url'] = 'url'
|
|
139
|
+
@_hash
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
# An array for optional fields
|
|
143
|
+
def self.optionals
|
|
144
|
+
%w[
|
|
145
|
+
account_sid
|
|
146
|
+
avg_task_acceptance_time
|
|
147
|
+
start_time
|
|
148
|
+
end_time
|
|
149
|
+
reservations_created
|
|
150
|
+
reservations_accepted
|
|
151
|
+
reservations_rejected
|
|
152
|
+
reservations_timed_out
|
|
153
|
+
reservations_canceled
|
|
154
|
+
reservations_rescinded
|
|
155
|
+
split_by_wait_time
|
|
156
|
+
task_queue_sid
|
|
157
|
+
wait_duration_until_accepted
|
|
158
|
+
wait_duration_until_canceled
|
|
159
|
+
wait_duration_in_queue_until_accepted
|
|
160
|
+
tasks_canceled
|
|
161
|
+
tasks_completed
|
|
162
|
+
tasks_deleted
|
|
163
|
+
tasks_entered
|
|
164
|
+
tasks_moved
|
|
165
|
+
workspace_sid
|
|
166
|
+
url
|
|
167
|
+
]
|
|
168
|
+
end
|
|
169
|
+
|
|
170
|
+
# An array for nullable fields
|
|
171
|
+
def self.nullables
|
|
172
|
+
%w[
|
|
173
|
+
account_sid
|
|
174
|
+
start_time
|
|
175
|
+
end_time
|
|
176
|
+
split_by_wait_time
|
|
177
|
+
task_queue_sid
|
|
178
|
+
wait_duration_until_accepted
|
|
179
|
+
wait_duration_until_canceled
|
|
180
|
+
wait_duration_in_queue_until_accepted
|
|
181
|
+
workspace_sid
|
|
182
|
+
url
|
|
183
|
+
]
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
def initialize(account_sid: SKIP, avg_task_acceptance_time: 0,
|
|
187
|
+
start_time: SKIP, end_time: SKIP, reservations_created: 0,
|
|
188
|
+
reservations_accepted: 0, reservations_rejected: 0,
|
|
189
|
+
reservations_timed_out: 0, reservations_canceled: 0,
|
|
190
|
+
reservations_rescinded: 0, split_by_wait_time: SKIP,
|
|
191
|
+
task_queue_sid: SKIP, wait_duration_until_accepted: SKIP,
|
|
192
|
+
wait_duration_until_canceled: SKIP,
|
|
193
|
+
wait_duration_in_queue_until_accepted: SKIP,
|
|
194
|
+
tasks_canceled: 0, tasks_completed: 0, tasks_deleted: 0,
|
|
195
|
+
tasks_entered: 0, tasks_moved: 0, workspace_sid: SKIP,
|
|
196
|
+
url: SKIP, additional_properties: nil)
|
|
197
|
+
# Add additional model properties to the instance
|
|
198
|
+
additional_properties = {} if additional_properties.nil?
|
|
199
|
+
|
|
200
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
201
|
+
@avg_task_acceptance_time = avg_task_acceptance_time unless avg_task_acceptance_time == SKIP
|
|
202
|
+
@start_time = start_time unless start_time == SKIP
|
|
203
|
+
@end_time = end_time unless end_time == SKIP
|
|
204
|
+
@reservations_created = reservations_created unless reservations_created == SKIP
|
|
205
|
+
@reservations_accepted = reservations_accepted unless reservations_accepted == SKIP
|
|
206
|
+
@reservations_rejected = reservations_rejected unless reservations_rejected == SKIP
|
|
207
|
+
@reservations_timed_out = reservations_timed_out unless reservations_timed_out == SKIP
|
|
208
|
+
@reservations_canceled = reservations_canceled unless reservations_canceled == SKIP
|
|
209
|
+
@reservations_rescinded = reservations_rescinded unless reservations_rescinded == SKIP
|
|
210
|
+
@split_by_wait_time = split_by_wait_time unless split_by_wait_time == SKIP
|
|
211
|
+
@task_queue_sid = task_queue_sid unless task_queue_sid == SKIP
|
|
212
|
+
unless wait_duration_until_accepted == SKIP
|
|
213
|
+
@wait_duration_until_accepted =
|
|
214
|
+
wait_duration_until_accepted
|
|
215
|
+
end
|
|
216
|
+
unless wait_duration_until_canceled == SKIP
|
|
217
|
+
@wait_duration_until_canceled =
|
|
218
|
+
wait_duration_until_canceled
|
|
219
|
+
end
|
|
220
|
+
unless wait_duration_in_queue_until_accepted == SKIP
|
|
221
|
+
@wait_duration_in_queue_until_accepted =
|
|
222
|
+
wait_duration_in_queue_until_accepted
|
|
223
|
+
end
|
|
224
|
+
@tasks_canceled = tasks_canceled unless tasks_canceled == SKIP
|
|
225
|
+
@tasks_completed = tasks_completed unless tasks_completed == SKIP
|
|
226
|
+
@tasks_deleted = tasks_deleted unless tasks_deleted == SKIP
|
|
227
|
+
@tasks_entered = tasks_entered unless tasks_entered == SKIP
|
|
228
|
+
@tasks_moved = tasks_moved unless tasks_moved == SKIP
|
|
229
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
230
|
+
@url = url unless url == SKIP
|
|
231
|
+
@additional_properties = additional_properties
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Creates an instance of the object from a hash.
|
|
235
|
+
def self.from_hash(hash)
|
|
236
|
+
return nil unless hash
|
|
237
|
+
|
|
238
|
+
# Extract variables from the hash.
|
|
239
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
240
|
+
avg_task_acceptance_time = hash['avg_task_acceptance_time'] ||= 0
|
|
241
|
+
start_time = if hash.key?('start_time')
|
|
242
|
+
(DateTimeHelper.from_rfc3339(hash['start_time']) if hash['start_time'])
|
|
243
|
+
else
|
|
244
|
+
SKIP
|
|
245
|
+
end
|
|
246
|
+
end_time = if hash.key?('end_time')
|
|
247
|
+
(DateTimeHelper.from_rfc3339(hash['end_time']) if hash['end_time'])
|
|
248
|
+
else
|
|
249
|
+
SKIP
|
|
250
|
+
end
|
|
251
|
+
reservations_created = hash['reservations_created'] ||= 0
|
|
252
|
+
reservations_accepted = hash['reservations_accepted'] ||= 0
|
|
253
|
+
reservations_rejected = hash['reservations_rejected'] ||= 0
|
|
254
|
+
reservations_timed_out = hash['reservations_timed_out'] ||= 0
|
|
255
|
+
reservations_canceled = hash['reservations_canceled'] ||= 0
|
|
256
|
+
reservations_rescinded = hash['reservations_rescinded'] ||= 0
|
|
257
|
+
split_by_wait_time =
|
|
258
|
+
hash.key?('split_by_wait_time') ? hash['split_by_wait_time'] : SKIP
|
|
259
|
+
task_queue_sid =
|
|
260
|
+
hash.key?('task_queue_sid') ? hash['task_queue_sid'] : SKIP
|
|
261
|
+
wait_duration_until_accepted =
|
|
262
|
+
hash.key?('wait_duration_until_accepted') ? hash['wait_duration_until_accepted'] : SKIP
|
|
263
|
+
wait_duration_until_canceled =
|
|
264
|
+
hash.key?('wait_duration_until_canceled') ? hash['wait_duration_until_canceled'] : SKIP
|
|
265
|
+
wait_duration_in_queue_until_accepted =
|
|
266
|
+
hash.key?('wait_duration_in_queue_until_accepted') ? hash['wait_duration_in_queue_until_accepted'] : SKIP
|
|
267
|
+
tasks_canceled = hash['tasks_canceled'] ||= 0
|
|
268
|
+
tasks_completed = hash['tasks_completed'] ||= 0
|
|
269
|
+
tasks_deleted = hash['tasks_deleted'] ||= 0
|
|
270
|
+
tasks_entered = hash['tasks_entered'] ||= 0
|
|
271
|
+
tasks_moved = hash['tasks_moved'] ||= 0
|
|
272
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
273
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
274
|
+
|
|
275
|
+
# Create a new hash for additional properties, removing known properties.
|
|
276
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
277
|
+
|
|
278
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
279
|
+
new_hash, proc { |value| value }
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
# Create object from extracted values.
|
|
283
|
+
TaskQueueCumulative.new(account_sid: account_sid,
|
|
284
|
+
avg_task_acceptance_time: avg_task_acceptance_time,
|
|
285
|
+
start_time: start_time,
|
|
286
|
+
end_time: end_time,
|
|
287
|
+
reservations_created: reservations_created,
|
|
288
|
+
reservations_accepted: reservations_accepted,
|
|
289
|
+
reservations_rejected: reservations_rejected,
|
|
290
|
+
reservations_timed_out: reservations_timed_out,
|
|
291
|
+
reservations_canceled: reservations_canceled,
|
|
292
|
+
reservations_rescinded: reservations_rescinded,
|
|
293
|
+
split_by_wait_time: split_by_wait_time,
|
|
294
|
+
task_queue_sid: task_queue_sid,
|
|
295
|
+
wait_duration_until_accepted: wait_duration_until_accepted,
|
|
296
|
+
wait_duration_until_canceled: wait_duration_until_canceled,
|
|
297
|
+
wait_duration_in_queue_until_accepted: wait_duration_in_queue_until_accepted,
|
|
298
|
+
tasks_canceled: tasks_canceled,
|
|
299
|
+
tasks_completed: tasks_completed,
|
|
300
|
+
tasks_deleted: tasks_deleted,
|
|
301
|
+
tasks_entered: tasks_entered,
|
|
302
|
+
tasks_moved: tasks_moved,
|
|
303
|
+
workspace_sid: workspace_sid,
|
|
304
|
+
url: url,
|
|
305
|
+
additional_properties: additional_properties)
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
def to_custom_start_time
|
|
309
|
+
DateTimeHelper.to_rfc3339(start_time)
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
def to_custom_end_time
|
|
313
|
+
DateTimeHelper.to_rfc3339(end_time)
|
|
314
|
+
end
|
|
315
|
+
|
|
316
|
+
# Provides a human-readable string representation of the object.
|
|
317
|
+
def to_s
|
|
318
|
+
class_name = self.class.name.split('::').last
|
|
319
|
+
"<#{class_name} account_sid: #{@account_sid}, avg_task_acceptance_time:"\
|
|
320
|
+
" #{@avg_task_acceptance_time}, start_time: #{@start_time}, end_time: #{@end_time},"\
|
|
321
|
+
" reservations_created: #{@reservations_created}, reservations_accepted:"\
|
|
322
|
+
" #{@reservations_accepted}, reservations_rejected: #{@reservations_rejected},"\
|
|
323
|
+
" reservations_timed_out: #{@reservations_timed_out}, reservations_canceled:"\
|
|
324
|
+
" #{@reservations_canceled}, reservations_rescinded: #{@reservations_rescinded},"\
|
|
325
|
+
" split_by_wait_time: #{@split_by_wait_time}, task_queue_sid: #{@task_queue_sid},"\
|
|
326
|
+
" wait_duration_until_accepted: #{@wait_duration_until_accepted},"\
|
|
327
|
+
" wait_duration_until_canceled: #{@wait_duration_until_canceled},"\
|
|
328
|
+
" wait_duration_in_queue_until_accepted: #{@wait_duration_in_queue_until_accepted},"\
|
|
329
|
+
" tasks_canceled: #{@tasks_canceled}, tasks_completed: #{@tasks_completed}, tasks_deleted:"\
|
|
330
|
+
" #{@tasks_deleted}, tasks_entered: #{@tasks_entered}, tasks_moved: #{@tasks_moved},"\
|
|
331
|
+
" workspace_sid: #{@workspace_sid}, url: #{@url}, additional_properties:"\
|
|
332
|
+
" #{@additional_properties}>"
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
336
|
+
def inspect
|
|
337
|
+
class_name = self.class.name.split('::').last
|
|
338
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, avg_task_acceptance_time:"\
|
|
339
|
+
" #{@avg_task_acceptance_time.inspect}, start_time: #{@start_time.inspect}, end_time:"\
|
|
340
|
+
" #{@end_time.inspect}, reservations_created: #{@reservations_created.inspect},"\
|
|
341
|
+
" reservations_accepted: #{@reservations_accepted.inspect}, reservations_rejected:"\
|
|
342
|
+
" #{@reservations_rejected.inspect}, reservations_timed_out:"\
|
|
343
|
+
" #{@reservations_timed_out.inspect}, reservations_canceled:"\
|
|
344
|
+
" #{@reservations_canceled.inspect}, reservations_rescinded:"\
|
|
345
|
+
" #{@reservations_rescinded.inspect}, split_by_wait_time: #{@split_by_wait_time.inspect},"\
|
|
346
|
+
" task_queue_sid: #{@task_queue_sid.inspect}, wait_duration_until_accepted:"\
|
|
347
|
+
" #{@wait_duration_until_accepted.inspect}, wait_duration_until_canceled:"\
|
|
348
|
+
" #{@wait_duration_until_canceled.inspect}, wait_duration_in_queue_until_accepted:"\
|
|
349
|
+
" #{@wait_duration_in_queue_until_accepted.inspect}, tasks_canceled:"\
|
|
350
|
+
" #{@tasks_canceled.inspect}, tasks_completed: #{@tasks_completed.inspect}, tasks_deleted:"\
|
|
351
|
+
" #{@tasks_deleted.inspect}, tasks_entered: #{@tasks_entered.inspect}, tasks_moved:"\
|
|
352
|
+
" #{@tasks_moved.inspect}, workspace_sid: #{@workspace_sid.inspect}, url: #{@url.inspect},"\
|
|
353
|
+
" additional_properties: #{@additional_properties}>"
|
|
354
|
+
end
|
|
355
|
+
end
|
|
356
|
+
end
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
# twilio_ap_is
|
|
2
|
+
#
|
|
3
|
+
# This file was automatically generated by APIMATIC v3.0 (
|
|
4
|
+
# https://www.apimatic.io ).
|
|
5
|
+
|
|
6
|
+
module TwilioApIs
|
|
7
|
+
# TaskQueueRealTimeStatistics Model.
|
|
8
|
+
class TaskQueueRealTimeStatistics < BaseModel
|
|
9
|
+
SKIP = Object.new
|
|
10
|
+
private_constant :SKIP
|
|
11
|
+
|
|
12
|
+
# The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that
|
|
13
|
+
# created the TaskQueue resource.
|
|
14
|
+
# @return [String]
|
|
15
|
+
attr_accessor :account_sid
|
|
16
|
+
|
|
17
|
+
# The number of current Workers by Activity.
|
|
18
|
+
# @return [Array[Object]]
|
|
19
|
+
attr_accessor :activity_statistics
|
|
20
|
+
|
|
21
|
+
# The age of the longest waiting Task.
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
attr_accessor :longest_task_waiting_age
|
|
24
|
+
|
|
25
|
+
# The SID of the longest waiting Task.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :longest_task_waiting_sid
|
|
28
|
+
|
|
29
|
+
# The relative age in the TaskQueue for the longest waiting Task.
|
|
30
|
+
# Calculation is based on the time when the Task entered the TaskQueue.
|
|
31
|
+
# @return [Integer]
|
|
32
|
+
attr_accessor :longest_relative_task_age_in_queue
|
|
33
|
+
|
|
34
|
+
# The Task SID of the Task waiting in the TaskQueue the longest. Calculation
|
|
35
|
+
# is based on the time when the Task entered the TaskQueue.
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :longest_relative_task_sid_in_queue
|
|
38
|
+
|
|
39
|
+
# The SID of the TaskQueue from which these statistics were calculated.
|
|
40
|
+
# @return [String]
|
|
41
|
+
attr_accessor :task_queue_sid
|
|
42
|
+
|
|
43
|
+
# The number of Tasks by priority. For example: `{"0": "10", "99": "5"}`
|
|
44
|
+
# shows 10 Tasks at priority 0 and 5 at priority 99.
|
|
45
|
+
# @return [Object]
|
|
46
|
+
attr_accessor :tasks_by_priority
|
|
47
|
+
|
|
48
|
+
# The number of Tasks by their current status. For example: `{"pending":
|
|
49
|
+
# "1", "reserved": "3", "assigned": "2", "completed": "5"}`.
|
|
50
|
+
# @return [Object]
|
|
51
|
+
attr_accessor :tasks_by_status
|
|
52
|
+
|
|
53
|
+
# The total number of Workers in the TaskQueue with an `available` status.
|
|
54
|
+
# Workers with an `available` status may already have active interactions or
|
|
55
|
+
# may have none.
|
|
56
|
+
# @return [Integer]
|
|
57
|
+
attr_accessor :total_available_workers
|
|
58
|
+
|
|
59
|
+
# The total number of Workers eligible for Tasks in the TaskQueue,
|
|
60
|
+
# independent of their Activity state.
|
|
61
|
+
# @return [Integer]
|
|
62
|
+
attr_accessor :total_eligible_workers
|
|
63
|
+
|
|
64
|
+
# The total number of Tasks.
|
|
65
|
+
# @return [Integer]
|
|
66
|
+
attr_accessor :total_tasks
|
|
67
|
+
|
|
68
|
+
# The SID of the Workspace that contains the TaskQueue.
|
|
69
|
+
# @return [String]
|
|
70
|
+
attr_accessor :workspace_sid
|
|
71
|
+
|
|
72
|
+
# The absolute URL of the TaskQueue statistics resource.
|
|
73
|
+
# @return [String]
|
|
74
|
+
attr_accessor :url
|
|
75
|
+
|
|
76
|
+
# A mapping from model property names to API property names.
|
|
77
|
+
def self.names
|
|
78
|
+
@_hash = {} if @_hash.nil?
|
|
79
|
+
@_hash['account_sid'] = 'account_sid'
|
|
80
|
+
@_hash['activity_statistics'] = 'activity_statistics'
|
|
81
|
+
@_hash['longest_task_waiting_age'] = 'longest_task_waiting_age'
|
|
82
|
+
@_hash['longest_task_waiting_sid'] = 'longest_task_waiting_sid'
|
|
83
|
+
@_hash['longest_relative_task_age_in_queue'] =
|
|
84
|
+
'longest_relative_task_age_in_queue'
|
|
85
|
+
@_hash['longest_relative_task_sid_in_queue'] =
|
|
86
|
+
'longest_relative_task_sid_in_queue'
|
|
87
|
+
@_hash['task_queue_sid'] = 'task_queue_sid'
|
|
88
|
+
@_hash['tasks_by_priority'] = 'tasks_by_priority'
|
|
89
|
+
@_hash['tasks_by_status'] = 'tasks_by_status'
|
|
90
|
+
@_hash['total_available_workers'] = 'total_available_workers'
|
|
91
|
+
@_hash['total_eligible_workers'] = 'total_eligible_workers'
|
|
92
|
+
@_hash['total_tasks'] = 'total_tasks'
|
|
93
|
+
@_hash['workspace_sid'] = 'workspace_sid'
|
|
94
|
+
@_hash['url'] = 'url'
|
|
95
|
+
@_hash
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# An array for optional fields
|
|
99
|
+
def self.optionals
|
|
100
|
+
%w[
|
|
101
|
+
account_sid
|
|
102
|
+
activity_statistics
|
|
103
|
+
longest_task_waiting_age
|
|
104
|
+
longest_task_waiting_sid
|
|
105
|
+
longest_relative_task_age_in_queue
|
|
106
|
+
longest_relative_task_sid_in_queue
|
|
107
|
+
task_queue_sid
|
|
108
|
+
tasks_by_priority
|
|
109
|
+
tasks_by_status
|
|
110
|
+
total_available_workers
|
|
111
|
+
total_eligible_workers
|
|
112
|
+
total_tasks
|
|
113
|
+
workspace_sid
|
|
114
|
+
url
|
|
115
|
+
]
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# An array for nullable fields
|
|
119
|
+
def self.nullables
|
|
120
|
+
%w[
|
|
121
|
+
account_sid
|
|
122
|
+
activity_statistics
|
|
123
|
+
longest_task_waiting_sid
|
|
124
|
+
longest_relative_task_sid_in_queue
|
|
125
|
+
task_queue_sid
|
|
126
|
+
tasks_by_priority
|
|
127
|
+
tasks_by_status
|
|
128
|
+
workspace_sid
|
|
129
|
+
url
|
|
130
|
+
]
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
def initialize(account_sid: SKIP, activity_statistics: SKIP,
|
|
134
|
+
longest_task_waiting_age: 0, longest_task_waiting_sid: SKIP,
|
|
135
|
+
longest_relative_task_age_in_queue: 0,
|
|
136
|
+
longest_relative_task_sid_in_queue: SKIP,
|
|
137
|
+
task_queue_sid: SKIP, tasks_by_priority: SKIP,
|
|
138
|
+
tasks_by_status: SKIP, total_available_workers: 0,
|
|
139
|
+
total_eligible_workers: 0, total_tasks: 0,
|
|
140
|
+
workspace_sid: SKIP, url: SKIP, additional_properties: nil)
|
|
141
|
+
# Add additional model properties to the instance
|
|
142
|
+
additional_properties = {} if additional_properties.nil?
|
|
143
|
+
|
|
144
|
+
@account_sid = account_sid unless account_sid == SKIP
|
|
145
|
+
@activity_statistics = activity_statistics unless activity_statistics == SKIP
|
|
146
|
+
@longest_task_waiting_age = longest_task_waiting_age unless longest_task_waiting_age == SKIP
|
|
147
|
+
@longest_task_waiting_sid = longest_task_waiting_sid unless longest_task_waiting_sid == SKIP
|
|
148
|
+
unless longest_relative_task_age_in_queue == SKIP
|
|
149
|
+
@longest_relative_task_age_in_queue =
|
|
150
|
+
longest_relative_task_age_in_queue
|
|
151
|
+
end
|
|
152
|
+
unless longest_relative_task_sid_in_queue == SKIP
|
|
153
|
+
@longest_relative_task_sid_in_queue =
|
|
154
|
+
longest_relative_task_sid_in_queue
|
|
155
|
+
end
|
|
156
|
+
@task_queue_sid = task_queue_sid unless task_queue_sid == SKIP
|
|
157
|
+
@tasks_by_priority = tasks_by_priority unless tasks_by_priority == SKIP
|
|
158
|
+
@tasks_by_status = tasks_by_status unless tasks_by_status == SKIP
|
|
159
|
+
@total_available_workers = total_available_workers unless total_available_workers == SKIP
|
|
160
|
+
@total_eligible_workers = total_eligible_workers unless total_eligible_workers == SKIP
|
|
161
|
+
@total_tasks = total_tasks unless total_tasks == SKIP
|
|
162
|
+
@workspace_sid = workspace_sid unless workspace_sid == SKIP
|
|
163
|
+
@url = url unless url == SKIP
|
|
164
|
+
@additional_properties = additional_properties
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Creates an instance of the object from a hash.
|
|
168
|
+
def self.from_hash(hash)
|
|
169
|
+
return nil unless hash
|
|
170
|
+
|
|
171
|
+
# Extract variables from the hash.
|
|
172
|
+
account_sid = hash.key?('account_sid') ? hash['account_sid'] : SKIP
|
|
173
|
+
activity_statistics =
|
|
174
|
+
hash.key?('activity_statistics') ? hash['activity_statistics'] : SKIP
|
|
175
|
+
longest_task_waiting_age = hash['longest_task_waiting_age'] ||= 0
|
|
176
|
+
longest_task_waiting_sid =
|
|
177
|
+
hash.key?('longest_task_waiting_sid') ? hash['longest_task_waiting_sid'] : SKIP
|
|
178
|
+
longest_relative_task_age_in_queue =
|
|
179
|
+
hash['longest_relative_task_age_in_queue'] ||= 0
|
|
180
|
+
longest_relative_task_sid_in_queue =
|
|
181
|
+
hash.key?('longest_relative_task_sid_in_queue') ? hash['longest_relative_task_sid_in_queue'] : SKIP
|
|
182
|
+
task_queue_sid =
|
|
183
|
+
hash.key?('task_queue_sid') ? hash['task_queue_sid'] : SKIP
|
|
184
|
+
tasks_by_priority =
|
|
185
|
+
hash.key?('tasks_by_priority') ? hash['tasks_by_priority'] : SKIP
|
|
186
|
+
tasks_by_status =
|
|
187
|
+
hash.key?('tasks_by_status') ? hash['tasks_by_status'] : SKIP
|
|
188
|
+
total_available_workers = hash['total_available_workers'] ||= 0
|
|
189
|
+
total_eligible_workers = hash['total_eligible_workers'] ||= 0
|
|
190
|
+
total_tasks = hash['total_tasks'] ||= 0
|
|
191
|
+
workspace_sid = hash.key?('workspace_sid') ? hash['workspace_sid'] : SKIP
|
|
192
|
+
url = hash.key?('url') ? hash['url'] : SKIP
|
|
193
|
+
|
|
194
|
+
# Create a new hash for additional properties, removing known properties.
|
|
195
|
+
new_hash = hash.reject { |k, _| names.value?(k) }
|
|
196
|
+
|
|
197
|
+
additional_properties = APIHelper.get_additional_properties(
|
|
198
|
+
new_hash, proc { |value| value }
|
|
199
|
+
)
|
|
200
|
+
|
|
201
|
+
# Create object from extracted values.
|
|
202
|
+
TaskQueueRealTimeStatistics.new(account_sid: account_sid,
|
|
203
|
+
activity_statistics: activity_statistics,
|
|
204
|
+
longest_task_waiting_age: longest_task_waiting_age,
|
|
205
|
+
longest_task_waiting_sid: longest_task_waiting_sid,
|
|
206
|
+
longest_relative_task_age_in_queue: longest_relative_task_age_in_queue,
|
|
207
|
+
longest_relative_task_sid_in_queue: longest_relative_task_sid_in_queue,
|
|
208
|
+
task_queue_sid: task_queue_sid,
|
|
209
|
+
tasks_by_priority: tasks_by_priority,
|
|
210
|
+
tasks_by_status: tasks_by_status,
|
|
211
|
+
total_available_workers: total_available_workers,
|
|
212
|
+
total_eligible_workers: total_eligible_workers,
|
|
213
|
+
total_tasks: total_tasks,
|
|
214
|
+
workspace_sid: workspace_sid,
|
|
215
|
+
url: url,
|
|
216
|
+
additional_properties: additional_properties)
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
# Provides a human-readable string representation of the object.
|
|
220
|
+
def to_s
|
|
221
|
+
class_name = self.class.name.split('::').last
|
|
222
|
+
"<#{class_name} account_sid: #{@account_sid}, activity_statistics: #{@activity_statistics},"\
|
|
223
|
+
" longest_task_waiting_age: #{@longest_task_waiting_age}, longest_task_waiting_sid:"\
|
|
224
|
+
" #{@longest_task_waiting_sid}, longest_relative_task_age_in_queue:"\
|
|
225
|
+
" #{@longest_relative_task_age_in_queue}, longest_relative_task_sid_in_queue:"\
|
|
226
|
+
" #{@longest_relative_task_sid_in_queue}, task_queue_sid: #{@task_queue_sid},"\
|
|
227
|
+
" tasks_by_priority: #{@tasks_by_priority}, tasks_by_status: #{@tasks_by_status},"\
|
|
228
|
+
" total_available_workers: #{@total_available_workers}, total_eligible_workers:"\
|
|
229
|
+
" #{@total_eligible_workers}, total_tasks: #{@total_tasks}, workspace_sid:"\
|
|
230
|
+
" #{@workspace_sid}, url: #{@url}, additional_properties: #{@additional_properties}>"
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
# Provides a debugging-friendly string with detailed object information.
|
|
234
|
+
def inspect
|
|
235
|
+
class_name = self.class.name.split('::').last
|
|
236
|
+
"<#{class_name} account_sid: #{@account_sid.inspect}, activity_statistics:"\
|
|
237
|
+
" #{@activity_statistics.inspect}, longest_task_waiting_age:"\
|
|
238
|
+
" #{@longest_task_waiting_age.inspect}, longest_task_waiting_sid:"\
|
|
239
|
+
" #{@longest_task_waiting_sid.inspect}, longest_relative_task_age_in_queue:"\
|
|
240
|
+
" #{@longest_relative_task_age_in_queue.inspect}, longest_relative_task_sid_in_queue:"\
|
|
241
|
+
" #{@longest_relative_task_sid_in_queue.inspect}, task_queue_sid:"\
|
|
242
|
+
" #{@task_queue_sid.inspect}, tasks_by_priority: #{@tasks_by_priority.inspect},"\
|
|
243
|
+
" tasks_by_status: #{@tasks_by_status.inspect}, total_available_workers:"\
|
|
244
|
+
" #{@total_available_workers.inspect}, total_eligible_workers:"\
|
|
245
|
+
" #{@total_eligible_workers.inspect}, total_tasks: #{@total_tasks.inspect}, workspace_sid:"\
|
|
246
|
+
" #{@workspace_sid.inspect}, url: #{@url.inspect}, additional_properties:"\
|
|
247
|
+
" #{@additional_properties}>"
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|