blob: 151c2d00fa9b8cc919a93ef0f4aebb56bf3e6e04 [file] [log] [blame]
// 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"
"github.com/go-openapi/validate"
)
// ReportParams report params
// swagger:model ReportParams
type ReportParams struct {
// client endpoint
// Required: true
ClientEndpoint *string `json:"ClientEndpoint"`
// event triggers
// Required: true
EventTriggers EventTriggerList `json:"EventTriggers"`
// meid
Meid string `json:"Meid,omitempty"`
// r a n function ID
// Required: true
RANFunctionID *int64 `json:"RANFunctionID"`
// report action definitions
ReportActionDefinitions *ReportActionDefinition `json:"ReportActionDefinitions,omitempty"`
}
// Validate validates this report params
func (m *ReportParams) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateClientEndpoint(formats); err != nil {
res = append(res, err)
}
if err := m.validateEventTriggers(formats); err != nil {
res = append(res, err)
}
if err := m.validateRANFunctionID(formats); err != nil {
res = append(res, err)
}
if err := m.validateReportActionDefinitions(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *ReportParams) validateClientEndpoint(formats strfmt.Registry) error {
if err := validate.Required("ClientEndpoint", "body", m.ClientEndpoint); err != nil {
return err
}
return nil
}
func (m *ReportParams) validateEventTriggers(formats strfmt.Registry) error {
if err := validate.Required("EventTriggers", "body", m.EventTriggers); err != nil {
return err
}
if err := m.EventTriggers.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("EventTriggers")
}
return err
}
return nil
}
func (m *ReportParams) validateRANFunctionID(formats strfmt.Registry) error {
if err := validate.Required("RANFunctionID", "body", m.RANFunctionID); err != nil {
return err
}
return nil
}
func (m *ReportParams) validateReportActionDefinitions(formats strfmt.Registry) error {
if swag.IsZero(m.ReportActionDefinitions) { // not required
return nil
}
if m.ReportActionDefinitions != nil {
if err := m.ReportActionDefinitions.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ReportActionDefinitions")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *ReportParams) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *ReportParams) UnmarshalBinary(b []byte) error {
var res ReportParams
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}