From 212edf0e2099217395b297f74fb35dc0d9444ce9 Mon Sep 17 00:00:00 2001 From: powervs-ibm Date: Wed, 3 Apr 2024 15:01:15 +0000 Subject: [PATCH] Generated Swagger client from service-broker commit 1efc6f47450f757d13cf5813a45212ed381b2b8d --- power/models/create_cos_image_import_job.go | 3 + power/models/export_image.go | 3 + power/models/p_vm_instance_capture.go | 3 + power/models/s_a_p_profile.go | 102 +++++++++++++++++++- 4 files changed, 109 insertions(+), 2 deletions(-) diff --git a/power/models/create_cos_image_import_job.go b/power/models/create_cos_image_import_job.go index 7511771e..c5e98fa2 100644 --- a/power/models/create_cos_image_import_job.go +++ b/power/models/create_cos_image_import_job.go @@ -31,6 +31,9 @@ type CreateCosImageImportJob struct { // Required: true BucketName *string `json:"bucketName"` + // Import and Check checksum file + Checksum bool `json:"checksum,omitempty"` + // Cloud Object Storage image filename // Required: true ImageFilename *string `json:"imageFilename"` diff --git a/power/models/export_image.go b/power/models/export_image.go index 1f8a17dd..2b5ff7f3 100644 --- a/power/models/export_image.go +++ b/power/models/export_image.go @@ -27,6 +27,9 @@ type ExportImage struct { // Required: true BucketName *string `json:"bucketName"` + // Create a checksum filename + Checksum bool `json:"checksum,omitempty"` + // Cloud Object Storage Region; required for IBM COS Region string `json:"region,omitempty"` diff --git a/power/models/p_vm_instance_capture.go b/power/models/p_vm_instance_capture.go index 7f925c28..edac443a 100644 --- a/power/models/p_vm_instance_capture.go +++ b/power/models/p_vm_instance_capture.go @@ -32,6 +32,9 @@ type PVMInstanceCapture struct { // List of Data volume IDs to include in the captured PVMInstance CaptureVolumeIDs []string `json:"captureVolumeIDs"` + // Create a checksum file + Checksum bool `json:"checksum,omitempty"` + // Cloud Storage Access key CloudStorageAccessKey string `json:"cloudStorageAccessKey,omitempty"` diff --git a/power/models/s_a_p_profile.go b/power/models/s_a_p_profile.go index 6333b489..06ece94a 100644 --- a/power/models/s_a_p_profile.go +++ b/power/models/s_a_p_profile.go @@ -28,6 +28,10 @@ type SAPProfile struct { // Required: true Cores *int64 `json:"cores"` + // Requires full system for deployment + // Required: true + FullSystemProfile *bool `json:"fullSystemProfile"` + // Amount of memory (in GB) // Required: true Memory *int64 `json:"memory"` @@ -36,13 +40,22 @@ type SAPProfile struct { // Required: true ProfileID *string `json:"profileID"` + // SAP Application Performance Standard + // Required: true + Saps *int64 `json:"saps"` + // List of supported systems SupportedSystems []string `json:"supportedSystems"` // Type of profile // Required: true - // Enum: [balanced compute memory non-production ultra-memory] + // Enum: [balanced compute memory non-production ultra-memory small SAP Rise Optimized] Type *string `json:"type"` + + // Workload Type + // Required: true + // Enum: [N/A OLAP OLTP OLAP/OLTP] + WorkloadType *string `json:"workloadType"` } // Validate validates this s a p profile @@ -57,6 +70,10 @@ func (m *SAPProfile) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateFullSystemProfile(formats); err != nil { + res = append(res, err) + } + if err := m.validateMemory(formats); err != nil { res = append(res, err) } @@ -65,10 +82,18 @@ func (m *SAPProfile) Validate(formats strfmt.Registry) error { res = append(res, err) } + if err := m.validateSaps(formats); err != nil { + res = append(res, err) + } + if err := m.validateType(formats); err != nil { res = append(res, err) } + if err := m.validateWorkloadType(formats); err != nil { + res = append(res, err) + } + if len(res) > 0 { return errors.CompositeValidationError(res...) } @@ -93,6 +118,15 @@ func (m *SAPProfile) validateCores(formats strfmt.Registry) error { return nil } +func (m *SAPProfile) validateFullSystemProfile(formats strfmt.Registry) error { + + if err := validate.Required("fullSystemProfile", "body", m.FullSystemProfile); err != nil { + return err + } + + return nil +} + func (m *SAPProfile) validateMemory(formats strfmt.Registry) error { if err := validate.Required("memory", "body", m.Memory); err != nil { @@ -111,11 +145,20 @@ func (m *SAPProfile) validateProfileID(formats strfmt.Registry) error { return nil } +func (m *SAPProfile) validateSaps(formats strfmt.Registry) error { + + if err := validate.Required("saps", "body", m.Saps); err != nil { + return err + } + + return nil +} + var sAPProfileTypeTypePropEnum []interface{} func init() { var res []string - if err := json.Unmarshal([]byte(`["balanced","compute","memory","non-production","ultra-memory"]`), &res); err != nil { + if err := json.Unmarshal([]byte(`["balanced","compute","memory","non-production","ultra-memory","small","SAP Rise Optimized"]`), &res); err != nil { panic(err) } for _, v := range res { @@ -139,6 +182,12 @@ const ( // SAPProfileTypeUltraDashMemory captures enum value "ultra-memory" SAPProfileTypeUltraDashMemory string = "ultra-memory" + + // SAPProfileTypeSmall captures enum value "small" + SAPProfileTypeSmall string = "small" + + // SAPProfileTypeSAPRiseOptimized captures enum value "SAP Rise Optimized" + SAPProfileTypeSAPRiseOptimized string = "SAP Rise Optimized" ) // prop value enum @@ -163,6 +212,55 @@ func (m *SAPProfile) validateType(formats strfmt.Registry) error { return nil } +var sAPProfileTypeWorkloadTypePropEnum []interface{} + +func init() { + var res []string + if err := json.Unmarshal([]byte(`["N/A","OLAP","OLTP","OLAP/OLTP"]`), &res); err != nil { + panic(err) + } + for _, v := range res { + sAPProfileTypeWorkloadTypePropEnum = append(sAPProfileTypeWorkloadTypePropEnum, v) + } +} + +const ( + + // SAPProfileWorkloadTypeNA captures enum value "N/A" + SAPProfileWorkloadTypeNA string = "N/A" + + // SAPProfileWorkloadTypeOLAP captures enum value "OLAP" + SAPProfileWorkloadTypeOLAP string = "OLAP" + + // SAPProfileWorkloadTypeOLTP captures enum value "OLTP" + SAPProfileWorkloadTypeOLTP string = "OLTP" + + // SAPProfileWorkloadTypeOLAPOLTP captures enum value "OLAP/OLTP" + SAPProfileWorkloadTypeOLAPOLTP string = "OLAP/OLTP" +) + +// prop value enum +func (m *SAPProfile) validateWorkloadTypeEnum(path, location string, value string) error { + if err := validate.EnumCase(path, location, value, sAPProfileTypeWorkloadTypePropEnum, true); err != nil { + return err + } + return nil +} + +func (m *SAPProfile) validateWorkloadType(formats strfmt.Registry) error { + + if err := validate.Required("workloadType", "body", m.WorkloadType); err != nil { + return err + } + + // value enum + if err := m.validateWorkloadTypeEnum("workloadType", "body", *m.WorkloadType); err != nil { + return err + } + + return nil +} + // ContextValidate validates this s a p profile based on context it is used func (m *SAPProfile) ContextValidate(ctx context.Context, formats strfmt.Registry) error { return nil