"""Sound Recording Activity schema.""" from marshmallow import EXCLUDE, Schema, fields, validate class CollaboratorsStatementPeriod(Schema): """Schema for collaborators statement period. Properties: - statement_period_id (str): the statement period ID - name (str): the statement period name - created_date (str): ISO formatted datetime of when the period was created - updated_date (str): ISO formatted datetime of when the period was updated - status (str): the status (OPEN, CLOSED) of the period. must be CLOSED """ class Meta: """Schema configuration.""" unknown = EXCLUDE statement_period_id = fields.Int(required=True, data_key='id') name = fields.Str(required=True) vendor_id = fields.Int(required=True) created_date = fields.DateTime(required=True, format='%Y-%m-%dT%H:%M:%S') updated_date = fields.DateTime(required=True, format='%Y-%m-%dT%H:%M:%S') status = fields.Str(required=True, validate=validate.Equal('CLOSED')) class CollaboratorsStatementPeriodClosed(Schema): """Schema for collaborators statement period closed event. Properties: - statement_period (CollaboratorsStatementPeriod): the statement period that was closed - active_collaborator_ids (str): collaborators with activity who are part of the statement period """ statement_period = fields.Nested(CollaboratorsStatementPeriod, required=True) active_collaborator_ids = fields.List(fields.Int, required=False, load_default=[]) class CollaboratorsBulkStatementPeriodClosed(Schema): """Schema for collaborators bulk statement period closed event. Properties: - items (CollaboratorsStatementPeriodClosed): see schema for details """ items = fields.List( fields.Nested(CollaboratorsStatementPeriodClosed), required=False, load_default=[] )