Beispiel #1
0
    class FeedAPIV1Schema(JitSchema):
        name = fields.Str()
        access_tier = fields.Int()
        description = fields.Str()

        @post_load
        def make(self, data):
            return FeedAPIRecord(**data)
Beispiel #2
0
    class GroupDownloadOperationV1Schema(JitSchema):
        feed = fields.Str()
        group = fields.Str()
        parameters = fields.Nested(
            GroupDownloadOperationParams.GroupDownloadOperationParamsV1Schema)

        @post_load
        def make(self, data):
            return GroupDownloadOperationConfiguration(**data)
Beispiel #3
0
    class GroupDownloadResultV1Schema(JitSchema):
        started = fields.DateTime()
        ended = fields.DateTime()
        feed = fields.Str()
        group = fields.Str()
        status = fields.Str()
        total_records = fields.Int()

        @post_load
        def make(self, data):
            return GroupDownloadResult(**data)
Beispiel #4
0
    class DownloadOperationV1Schema(JitSchema):
        groups = fields.List(
            fields.Nested(GroupDownloadOperationConfiguration.
                          GroupDownloadOperationV1Schema))
        source_uri = fields.Str()
        uuid = fields.UUID()

        @post_load
        def make(self, data):
            return DownloadOperationConfiguration(**data)
Beispiel #5
0
    class DownloadOperationResultV1Schema(JitSchema):
        started = fields.DateTime(allow_none=True)
        ended = fields.DateTime(allow_none=True)
        status = fields.Str(allow_none=True)
        results = fields.List(
            fields.Nested(GroupDownloadResult.GroupDownloadResultV1Schema))

        @post_load
        def make(self, data):
            return DownloadOperationResult(**data)
Beispiel #6
0
    class LocalFeedDataRepoMetadataV1Schema(JitSchema):
        download_configuration = fields.Nested(
            DownloadOperationConfiguration.DownloadOperationV1Schema,
            allow_none=True)
        download_result = fields.Nested(
            DownloadOperationResult.DownloadOperationResultV1Schema,
            allow_none=True)
        data_write_dir = fields.Str()

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