class FeedGroupMetadataV1Schema(Schema):
        name = fields.Str()
        created_at = RFC3339DateTime()
        updated_at = RFC3339DateTime()
        last_sync = RFC3339DateTime()
        enabled = fields.Boolean()
        record_count = fields.Integer()

        @post_load
        def make(self, data, **kwargs):
            return FeedGroupMetadata(**data)
    class FeedMetadataV1Schema(Schema):
        name = fields.Str()
        created_at = RFC3339DateTime()
        updated_at = RFC3339DateTime()
        last_full_sync = RFC3339DateTime()
        enabled = fields.Boolean()
        groups = fields.List(
            fields.Nested(FeedGroupMetadata.FeedGroupMetadataV1Schema))

        @post_load
        def make(self, data, **kwargs):
            return FeedMetadata(**data)
    class ImageV1Schema(Schema):
        id = fields.Str()
        digest = fields.Str()
        user_id = fields.Str()
        state = fields.Str()
        distro_namespace = fields.Str()
        created_at = RFC3339DateTime()
        last_modified = RFC3339DateTime()
        tags = fields.List(fields.Str())

        @post_load
        def make(self, data, **kwargs):
            return Image(**data)
    class VulnerabilitiesReportMetadataV1Schema(Schema):
        schema_version = fields.Str()
        generated_at = RFC3339DateTime()
        generated_by = fields.Dict()

        @post_load
        def make(self, data, **kwargs):
            return VulnerabilitiesReportMetadata(**data)
    class EventStatusV1Schema(Schema):
        event_id = fields.Str()
        event_timestamp = RFC3339DateTime()
        event_state = fields.Str()

        @post_load
        def make(self, data, **kwargs):
            return EventStatus(**data)
    class DistroMappingV1Schema(Schema):
        from_distro = fields.Str()
        to_distro = fields.Str()
        flavor = fields.Str()
        created_at = RFC3339DateTime()

        @post_load
        def make(self, data, **kwargs):
            return DistroMapping(**data)
    class FixedArtifactV1Schema(Schema):
        versions = fields.List(fields.Str())
        wont_fix = fields.Bool()
        observed_at = RFC3339DateTime(
            allow_none=True,
            missing=None,
        )
        advisories = fields.List(fields.Nested(Advisory.AdvisoryV1Schema))

        @post_load
        def make(self, data, **kwargs):
            return FixedArtifact(**data)
    class MatchV1Schema(Schema):
        detected_at = RFC3339DateTime()

        @post_load
        def make(self, data, **kwargs):
            return Match(**data)