diff --git a/vngcloud/entity/snapshot.go b/vngcloud/entity/snapshot.go index 5fc6f24..bb8d90a 100644 --- a/vngcloud/entity/snapshot.go +++ b/vngcloud/entity/snapshot.go @@ -11,5 +11,9 @@ type Snapshot struct { } type ListSnapshots struct { - Items []*Snapshot + Items []*Snapshot + TotalPages int + Page int + PageSize int + TotalItems int } diff --git a/vngcloud/services/volume/v2/snapshot_response.go b/vngcloud/services/volume/v2/snapshot_response.go index f60596a..057ab7b 100644 --- a/vngcloud/services/volume/v2/snapshot_response.go +++ b/vngcloud/services/volume/v2/snapshot_response.go @@ -75,6 +75,11 @@ func (s *ListSnapshotByBlockVolumeIdResponse) ToEntityListSnapshots() *lsentity. sl.Items = append(sl.Items, item.toEntitySnapshot()) } + sl.TotalPages = s.TotalPages + sl.Page = s.Page + sl.PageSize = s.PageSize + sl.TotalItems = s.TotalItems + return sl }