From 31eecaaff557cf3d03cbbf7de7c2e204eb8e8d1f Mon Sep 17 00:00:00 2001 From: powervs-ibm <137309855+powervs-ibm@users.noreply.github.com> Date: Mon, 8 Apr 2024 08:10:06 -0500 Subject: [PATCH] Generated Swagger client from service-broker commit c4cb98d889ffe37cd2324735bfc86efe4e1fdbb6 (#374) --- power/models/s_a_p_create.go | 51 ++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/power/models/s_a_p_create.go b/power/models/s_a_p_create.go index 632bc758..36187301 100644 --- a/power/models/s_a_p_create.go +++ b/power/models/s_a_p_create.go @@ -20,6 +20,9 @@ import ( // swagger:model SAPCreate type SAPCreate struct { + // The deployment of a dedicated host + DeploymentTarget *DeploymentTarget `json:"deploymentTarget,omitempty"` + // Custom SAP Deployment Type Information (For Internal Use Only) DeploymentType string `json:"deploymentType,omitempty"` @@ -74,6 +77,10 @@ type SAPCreate struct { func (m *SAPCreate) Validate(formats strfmt.Registry) error { var res []error + if err := m.validateDeploymentTarget(formats); err != nil { + res = append(res, err) + } + if err := m.validateImageID(formats); err != nil { res = append(res, err) } @@ -108,6 +115,25 @@ func (m *SAPCreate) Validate(formats strfmt.Registry) error { return nil } +func (m *SAPCreate) validateDeploymentTarget(formats strfmt.Registry) error { + if swag.IsZero(m.DeploymentTarget) { // not required + return nil + } + + if m.DeploymentTarget != nil { + if err := m.DeploymentTarget.Validate(formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deploymentTarget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deploymentTarget") + } + return err + } + } + + return nil +} + func (m *SAPCreate) validateImageID(formats strfmt.Registry) error { if err := validate.Required("imageID", "body", m.ImageID); err != nil { @@ -221,6 +247,10 @@ func (m *SAPCreate) validateStorageAffinity(formats strfmt.Registry) error { func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error { var res []error + if err := m.contextValidateDeploymentTarget(ctx, formats); err != nil { + res = append(res, err) + } + if err := m.contextValidateInstances(ctx, formats); err != nil { res = append(res, err) } @@ -243,6 +273,27 @@ func (m *SAPCreate) ContextValidate(ctx context.Context, formats strfmt.Registry return nil } +func (m *SAPCreate) contextValidateDeploymentTarget(ctx context.Context, formats strfmt.Registry) error { + + if m.DeploymentTarget != nil { + + if swag.IsZero(m.DeploymentTarget) { // not required + return nil + } + + if err := m.DeploymentTarget.ContextValidate(ctx, formats); err != nil { + if ve, ok := err.(*errors.Validation); ok { + return ve.ValidateName("deploymentTarget") + } else if ce, ok := err.(*errors.CompositeError); ok { + return ce.ValidateName("deploymentTarget") + } + return err + } + } + + return nil +} + func (m *SAPCreate) contextValidateInstances(ctx context.Context, formats strfmt.Registry) error { if m.Instances != nil {