SetCsrNotifications models

DataSet models for SetCsrNotifications.

These typed dataclass models represent the tables and columns within the DataSet parameters for the SetCsrNotifications HQ operation.

IMPORTANT: Update operations require a GET first to populate the original_record field. HQ uses the unchanged row for optimistic concurrency checking.

Usage:

from q2_sdk.hq.hq_api.backoffice import SetCsrNotifications

q2_system_alert_view = SetCsrNotifications.Q2SystemAlertView(
    system_alert_id=1,
    action_id=1,
    target_address="...",
    enabled=True,
    error_return_code=1,
    error_return_code_short_name="...",
    error_return_code_description="...",
    audit_action_short_name="...",
    audit_action_description="...",
    audit_category_short_name="...",
    audit_category_description="...",
)
class q2_sdk.hq.hq_api.backoffice.SetCsrNotifications_models.Q2SystemAlertView(system_alert_id=0, action_id=0, target_address='', enabled=False, error_return_code=0, error_return_code_short_name='', error_return_code_description='', audit_action_short_name='', audit_action_description='', audit_category_short_name='', audit_category_description='', original_record=None)[source]

Bases: object

Represents a row in the Q2_SystemAlertView table.

system_alert_id: int = 0
action_id: int = 0
target_address: str = ''
enabled: bool = False
error_return_code: int = 0
error_return_code_short_name: str = ''
error_return_code_description: str = ''
audit_action_short_name: str = ''
audit_action_description: str = ''
audit_category_short_name: str = ''
audit_category_description: str = ''
original_record: Q2SystemAlertView | None = None
static get_columns()[source]

Returns [[HqColumnName, pythonAttrName], …] mapping.

Return type:

list[list[str]]

to_row_values()[source]

Returns column values in get_columns() order.

Return type:

list[Any]

classmethod from_hq_response(row_elem)[source]

Parse an lxml row element into this model with original_record set.

Return type:

Q2SystemAlertView

q2_sdk.hq.hq_api.backoffice.SetCsrNotifications_models.build_csr_notifications_dataset(q2_system_alert_view=None)[source]

Build the csr_notifications DataSet parameter for SetCsrNotifications.

For update operations, each model instance should have its original_record set to the pre-modification state (from a prior GET call).

For add operations, set auto-increment ID fields to negative values.

Return type:

DataSetBuilder

Returns:

DataSetBuilder ready to pass as the ‘csr_notifications’ parameter