Skip to content

Commit cabab59

Browse files
committed
Update API ListNodes: add request parameters WorkspaceId.
1 parent 93d92b0 commit cabab59

File tree

6 files changed

+62
-2
lines changed

6 files changed

+62
-2
lines changed

ChangeLog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-11-04 Version: v2.1.14
2+
- Update API ListNodes: add request parameters WorkspaceId.
3+
4+
15
2025-10-31 Version: v2.1.13
26
- Generated golang 2022-01-12 for PaiStudio.
37

client/client.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,6 +2392,10 @@ func (client *Client) ListNodesWithOptions(request *ListNodesRequest, headers ma
23922392
query["Verbose"] = request.Verbose
23932393
}
23942394

2395+
if !dara.IsNil(request.WorkspaceId) {
2396+
query["WorkspaceId"] = request.WorkspaceId
2397+
}
2398+
23952399
req := &openapiutil.OpenApiRequest{
23962400
Headers: headers,
23972401
Query: openapiutil.Query(query),

client/client_context_func.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1722,6 +1722,10 @@ func (client *Client) ListNodesWithContext(ctx context.Context, request *ListNod
17221722
query["Verbose"] = request.Verbose
17231723
}
17241724

1725+
if !dara.IsNil(request.WorkspaceId) {
1726+
query["WorkspaceId"] = request.WorkspaceId
1727+
}
1728+
17251729
req := &openapiutil.OpenApiRequest{
17261730
Headers: headers,
17271731
Query: openapiutil.Query(query),

client/list_nodes_request_model.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ type iListNodesRequest interface {
5555
GetSortBy() *string
5656
SetVerbose(v bool) *ListNodesRequest
5757
GetVerbose() *bool
58+
SetWorkspaceId(v string) *ListNodesRequest
59+
GetWorkspaceId() *string
5860
}
5961

6062
type ListNodesRequest struct {
@@ -128,7 +130,8 @@ type ListNodesRequest struct {
128130
// example:
129131
//
130132
// false
131-
Verbose *bool `json:"Verbose,omitempty" xml:"Verbose,omitempty"`
133+
Verbose *bool `json:"Verbose,omitempty" xml:"Verbose,omitempty"`
134+
WorkspaceId *string `json:"WorkspaceId,omitempty" xml:"WorkspaceId,omitempty"`
132135
}
133136

134137
func (s ListNodesRequest) String() string {
@@ -231,6 +234,10 @@ func (s *ListNodesRequest) GetVerbose() *bool {
231234
return s.Verbose
232235
}
233236

237+
func (s *ListNodesRequest) GetWorkspaceId() *string {
238+
return s.WorkspaceId
239+
}
240+
234241
func (s *ListNodesRequest) SetAcceleratorType(v string) *ListNodesRequest {
235242
s.AcceleratorType = &v
236243
return s
@@ -346,6 +353,11 @@ func (s *ListNodesRequest) SetVerbose(v bool) *ListNodesRequest {
346353
return s
347354
}
348355

356+
func (s *ListNodesRequest) SetWorkspaceId(v string) *ListNodesRequest {
357+
s.WorkspaceId = &v
358+
return s
359+
}
360+
349361
func (s *ListNodesRequest) Validate() error {
350362
return dara.Validate(s)
351363
}

client/node_model.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ type iNode interface {
2727
GetCreatorId() *string
2828
SetDescendantQuotaWorkloadNum(v int64) *Node
2929
GetDescendantQuotaWorkloadNum() *int64
30+
SetDiskCapacity(v int64) *Node
31+
GetDiskCapacity() *int64
32+
SetDiskPL(v string) *Node
33+
GetDiskPL() *string
3034
SetGPU(v string) *Node
3135
GetGPU() *string
3236
SetGPUMemory(v string) *Node
@@ -99,6 +103,8 @@ type Node struct {
99103
CPU *string `json:"CPU,omitempty" xml:"CPU,omitempty"`
100104
CreatorId *string `json:"CreatorId,omitempty" xml:"CreatorId,omitempty"`
101105
DescendantQuotaWorkloadNum *int64 `json:"DescendantQuotaWorkloadNum,omitempty" xml:"DescendantQuotaWorkloadNum,omitempty"`
106+
DiskCapacity *int64 `json:"DiskCapacity,omitempty" xml:"DiskCapacity,omitempty"`
107+
DiskPL *string `json:"DiskPL,omitempty" xml:"DiskPL,omitempty"`
102108
GPU *string `json:"GPU,omitempty" xml:"GPU,omitempty"`
103109
GPUMemory *string `json:"GPUMemory,omitempty" xml:"GPUMemory,omitempty"`
104110
GPUType *string `json:"GPUType,omitempty" xml:"GPUType,omitempty"`
@@ -175,6 +181,14 @@ func (s *Node) GetDescendantQuotaWorkloadNum() *int64 {
175181
return s.DescendantQuotaWorkloadNum
176182
}
177183

184+
func (s *Node) GetDiskCapacity() *int64 {
185+
return s.DiskCapacity
186+
}
187+
188+
func (s *Node) GetDiskPL() *string {
189+
return s.DiskPL
190+
}
191+
178192
func (s *Node) GetGPU() *string {
179193
return s.GPU
180194
}
@@ -340,6 +354,16 @@ func (s *Node) SetDescendantQuotaWorkloadNum(v int64) *Node {
340354
return s
341355
}
342356

357+
func (s *Node) SetDiskCapacity(v int64) *Node {
358+
s.DiskCapacity = &v
359+
return s
360+
}
361+
362+
func (s *Node) SetDiskPL(v string) *Node {
363+
s.DiskPL = &v
364+
return s
365+
}
366+
343367
func (s *Node) SetGPU(v string) *Node {
344368
s.GPU = &v
345369
return s

client/node_spec_model.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ type iNodeSpec interface {
1313
GetBindingPolicy() *BindingPolicy
1414
SetCount(v int64) *NodeSpec
1515
GetCount() *int64
16+
SetHyperType(v string) *NodeSpec
17+
GetHyperType() *string
1618
SetType(v string) *NodeSpec
1719
GetType() *string
1820
}
@@ -22,7 +24,8 @@ type NodeSpec struct {
2224
// example:
2325
//
2426
// 10
25-
Count *int64 `json:"Count,omitempty" xml:"Count,omitempty"`
27+
Count *int64 `json:"Count,omitempty" xml:"Count,omitempty"`
28+
HyperType *string `json:"HyperType,omitempty" xml:"HyperType,omitempty"`
2629
// example:
2730
//
2831
// ecs.g6.4xlarge
@@ -45,6 +48,10 @@ func (s *NodeSpec) GetCount() *int64 {
4548
return s.Count
4649
}
4750

51+
func (s *NodeSpec) GetHyperType() *string {
52+
return s.HyperType
53+
}
54+
4855
func (s *NodeSpec) GetType() *string {
4956
return s.Type
5057
}
@@ -59,6 +66,11 @@ func (s *NodeSpec) SetCount(v int64) *NodeSpec {
5966
return s
6067
}
6168

69+
func (s *NodeSpec) SetHyperType(v string) *NodeSpec {
70+
s.HyperType = &v
71+
return s
72+
}
73+
6274
func (s *NodeSpec) SetType(v string) *NodeSpec {
6375
s.Type = &v
6476
return s

0 commit comments

Comments
 (0)