New API version with additional structures and params
Change-Id: I02855719e75a9f8d9a0f56e762e56bdc143803ce
Signed-off-by: Mohamed Abukar <abukar.mohamed@nokia.com>
diff --git a/pkg/clientmodel/policy_action_definition.go b/pkg/clientmodel/policy_action_definition.go
new file mode 100644
index 0000000..4190913
--- /dev/null
+++ b/pkg/clientmodel/policy_action_definition.go
@@ -0,0 +1,71 @@
+// Code generated by go-swagger; DO NOT EDIT.
+
+package clientmodel
+
+// This file was generated by the swagger tool.
+// Editing this file might prove futile when you re-run the swagger generate command
+
+import (
+ strfmt "github.com/go-openapi/strfmt"
+
+ "github.com/go-openapi/errors"
+ "github.com/go-openapi/swag"
+)
+
+// PolicyActionDefinition policy action definition
+// swagger:model PolicyActionDefinition
+type PolicyActionDefinition struct {
+
+ // action definition format2
+ ActionDefinitionFormat2 *Format2ActionDefinition `json:"ActionDefinitionFormat2,omitempty"`
+}
+
+// Validate validates this policy action definition
+func (m *PolicyActionDefinition) Validate(formats strfmt.Registry) error {
+ var res []error
+
+ if err := m.validateActionDefinitionFormat2(formats); err != nil {
+ res = append(res, err)
+ }
+
+ if len(res) > 0 {
+ return errors.CompositeValidationError(res...)
+ }
+ return nil
+}
+
+func (m *PolicyActionDefinition) validateActionDefinitionFormat2(formats strfmt.Registry) error {
+
+ if swag.IsZero(m.ActionDefinitionFormat2) { // not required
+ return nil
+ }
+
+ if m.ActionDefinitionFormat2 != nil {
+ if err := m.ActionDefinitionFormat2.Validate(formats); err != nil {
+ if ve, ok := err.(*errors.Validation); ok {
+ return ve.ValidateName("ActionDefinitionFormat2")
+ }
+ return err
+ }
+ }
+
+ return nil
+}
+
+// MarshalBinary interface implementation
+func (m *PolicyActionDefinition) MarshalBinary() ([]byte, error) {
+ if m == nil {
+ return nil, nil
+ }
+ return swag.WriteJSON(m)
+}
+
+// UnmarshalBinary interface implementation
+func (m *PolicyActionDefinition) UnmarshalBinary(b []byte) error {
+ var res PolicyActionDefinition
+ if err := swag.ReadJSON(b, &res); err != nil {
+ return err
+ }
+ *m = res
+ return nil
+}