// 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 ( "strconv" strfmt "github.com/go-openapi/strfmt" "github.com/go-openapi/errors" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // Format2ActionDefinition format2 action definition // swagger:model Format2ActionDefinition type Format2ActionDefinition struct { // r a n ue group parameters // Required: true RANUeGroupParameters []*RANUeGroupList `json:"RANUeGroupParameters"` } // Validate validates this format2 action definition func (m *Format2ActionDefinition) Validate(formats strfmt.Registry) error { var res []error if err := m.validateRANUeGroupParameters(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } func (m *Format2ActionDefinition) validateRANUeGroupParameters(formats strfmt.Registry) error { if err := validate.Required("RANUeGroupParameters", "body", m.RANUeGroupParameters); err != nil { return err } for i := 0; i < len(m.RANUeGroupParameters); i++ { if swag.IsZero(m.RANUeGroupParameters[i]) { // not required continue } if m.RANUeGroupParameters[i] != nil { if err := m.RANUeGroupParameters[i].Validate(formats); err != nil { if ve, ok := err.(*errors.Validation); ok { return ve.ValidateName("RANUeGroupParameters" + "." + strconv.Itoa(i)) } return err } } } return nil } // MarshalBinary interface implementation func (m *Format2ActionDefinition) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *Format2ActionDefinition) UnmarshalBinary(b []byte) error { var res Format2ActionDefinition if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }