|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | + |
| 3 | +""" |
| 4 | +This file is part of the Ingram Micro Cloud Blue Connect SDK. |
| 5 | +Copyright (c) 2019 Ingram Micro. All Rights Reserved. |
| 6 | +""" |
| 7 | + |
1 | 8 | from marshmallow import fields, post_load |
2 | 9 |
|
3 | | -from .base import BaseObject, BaseScheme |
4 | | -from .connection import ConnectionScheme |
5 | | -from .parameters import ParamScheme |
6 | | -from .product import ItemScheme, ProductScheme |
7 | | -from .tiers import TiersSchemeMixin |
| 10 | +from .base import BaseModel, BaseSchema |
| 11 | +from .connection import ConnectionSchema |
| 12 | +from .parameters import ParamSchema |
| 13 | +from .product import ItemSchema, ProductSchema |
| 14 | +from .tiers import TiersSchemaMixin |
8 | 15 |
|
9 | 16 |
|
10 | | -class Asset(BaseObject): |
| 17 | +class Asset(BaseModel): |
11 | 18 | pass |
12 | 19 |
|
13 | 20 |
|
14 | | -class AssetScheme(BaseScheme): |
| 21 | +class AssetSchema(BaseSchema): |
15 | 22 | status = fields.Str() |
16 | 23 | external_id = fields.Str() |
17 | 24 | external_uid = fields.UUID() |
18 | | - product = fields.Nested(ProductScheme, only=('id', 'name')) |
| 25 | + product = fields.Nested(ProductSchema, only=('id', 'name')) |
19 | 26 | connection = fields.Nested( |
20 | | - ConnectionScheme, only=('id', 'type', 'provider', 'vendor'), |
| 27 | + ConnectionSchema, only=('id', 'type', 'provider', 'vendor'), |
21 | 28 | ) |
22 | | - items = fields.List(fields.Nested(ItemScheme)) |
23 | | - params = fields.List(fields.Nested(ParamScheme)) |
24 | | - tiers = fields.Nested(TiersSchemeMixin) |
| 29 | + items = fields.List(fields.Nested(ItemSchema)) |
| 30 | + params = fields.List(fields.Nested(ParamSchema)) |
| 31 | + tiers = fields.Nested(TiersSchemaMixin) |
25 | 32 |
|
26 | 33 | @post_load |
27 | 34 | def make_object(self, data): |
|
0 commit comments