blob: 02955ce62f096f87014c4b46ce5b945ebdd361be [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 (
"encoding/json"
strfmt "github.com/go-openapi/strfmt"
"github.com/go-openapi/errors"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// EventTrigger event trigger
// swagger:model EventTrigger
type EventTrigger struct {
// e n b Id
ENBID string `json:"ENBId,omitempty"`
// interface direction
InterfaceDirection int64 `json:"InterfaceDirection,omitempty"`
// plmn Id
PlmnID string `json:"PlmnId,omitempty"`
// procedure code
ProcedureCode int64 `json:"ProcedureCode,omitempty"`
// trigger nature
// Enum: [now on change]
TriggerNature string `json:"TriggerNature,omitempty"`
// type of message
TypeOfMessage int64 `json:"TypeOfMessage,omitempty"`
}
// Validate validates this event trigger
func (m *EventTrigger) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateTriggerNature(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var eventTriggerTypeTriggerNaturePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["now","on change"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
eventTriggerTypeTriggerNaturePropEnum = append(eventTriggerTypeTriggerNaturePropEnum, v)
}
}
const (
// EventTriggerTriggerNatureNow captures enum value "now"
EventTriggerTriggerNatureNow string = "now"
// EventTriggerTriggerNatureOnChange captures enum value "on change"
EventTriggerTriggerNatureOnChange string = "on change"
)
// prop value enum
func (m *EventTrigger) validateTriggerNatureEnum(path, location string, value string) error {
if err := validate.Enum(path, location, value, eventTriggerTypeTriggerNaturePropEnum); err != nil {
return err
}
return nil
}
func (m *EventTrigger) validateTriggerNature(formats strfmt.Registry) error {
if swag.IsZero(m.TriggerNature) { // not required
return nil
}
// value enum
if err := m.validateTriggerNatureEnum("TriggerNature", "body", m.TriggerNature); err != nil {
return err
}
return nil
}
// MarshalBinary interface implementation
func (m *EventTrigger) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *EventTrigger) UnmarshalBinary(b []byte) error {
var res EventTrigger
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}