From c93c31eb4afbe97b5da61de1562e84dd2491933a Mon Sep 17 00:00:00 2001 From: Henry Avetisyan Date: Thu, 19 Oct 2023 08:39:57 -0700 Subject: [PATCH] msd go client sync up with rdl Signed-off-by: Henry Avetisyan --- clients/go/msd/model.go | 12 ++++++------ clients/go/msd/msd_schema.go | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clients/go/msd/model.go b/clients/go/msd/model.go index 95eed3475de..9c38cf805e6 100644 --- a/clients/go/msd/model.go +++ b/clients/go/msd/model.go @@ -1914,9 +1914,9 @@ func (self *DomainServices) Validate() error { type BulkWorkloadRequest struct { // - // list of workload requests by services, grouped by domain + // list of services, grouped by domain // - WorkloadRequest []*DomainServices `json:"workloadRequest"` + DomainServices []*DomainServices `json:"domainServices"` // // whether to fetch static type workloads @@ -1953,8 +1953,8 @@ func NewBulkWorkloadRequest(init ...*BulkWorkloadRequest) *BulkWorkloadRequest { // Init - sets up the instance according to its default field values, if any func (self *BulkWorkloadRequest) Init() *BulkWorkloadRequest { - if self.WorkloadRequest == nil { - self.WorkloadRequest = make([]*DomainServices, 0) + if self.DomainServices == nil { + self.DomainServices = make([]*DomainServices, 0) } if self.FetchStaticTypeWorkloads == nil { d := true @@ -1987,8 +1987,8 @@ func (self *BulkWorkloadRequest) UnmarshalJSON(b []byte) error { // Validate - checks for missing required fields, etc func (self *BulkWorkloadRequest) Validate() error { - if self.WorkloadRequest == nil { - return fmt.Errorf("BulkWorkloadRequest: Missing required field: workloadRequest") + if self.DomainServices == nil { + return fmt.Errorf("BulkWorkloadRequest: Missing required field: domainServices") } return nil } diff --git a/clients/go/msd/msd_schema.go b/clients/go/msd/msd_schema.go index 9f124f7f29d..be5f7c49855 100644 --- a/clients/go/msd/msd_schema.go +++ b/clients/go/msd/msd_schema.go @@ -286,7 +286,7 @@ func init() { tBulkWorkloadRequest := rdl.NewStructTypeBuilder("Struct", "BulkWorkloadRequest") tBulkWorkloadRequest.Comment("request type to search all workloads for a list of services grouped by domains") - tBulkWorkloadRequest.ArrayField("workloadRequest", "DomainServices", false, "list of workload requests by services, grouped by domain") + tBulkWorkloadRequest.ArrayField("domainServices", "DomainServices", false, "list of services, grouped by domain") tBulkWorkloadRequest.Field("fetchStaticTypeWorkloads", "Bool", true, true, "whether to fetch static type workloads") tBulkWorkloadRequest.Field("fetchDynamicTypeWorkloads", "Bool", true, true, "whether to fetch dynamic type workloads") tBulkWorkloadRequest.ArrayField("applicableStaticTypes", "StaticWorkloadType", true, "list of applicable static workload types, if not set then that means all. Applicable only if fetchStaticTypeWorkloads is enabled")