+++ /dev/null
-// 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"
-)
-
-// PolicyParams policy params
-// swagger:model PolicyParams
-type PolicyParams struct {
-
- // client endpoint
- // Required: true
- ClientEndpoint *string `json:"ClientEndpoint"`
-
- // event triggers
- // Required: true
- EventTriggers EventTriggerList `json:"EventTriggers"`
-
- // meid
- // Required: true
- Meid *string `json:"Meid"`
-
- // policy action definitions
- // Required: true
- PolicyActionDefinitions *PolicyActionDefinition `json:"PolicyActionDefinitions"`
-
- // r a n function ID
- // Required: true
- RANFunctionID *int64 `json:"RANFunctionID"`
-}
-
-// Validate validates this policy params
-func (m *PolicyParams) 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.validateMeid(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validatePolicyActionDefinitions(formats); err != nil {
- res = append(res, err)
- }
-
- if err := m.validateRANFunctionID(formats); err != nil {
- res = append(res, err)
- }
-
- if len(res) > 0 {
- return errors.CompositeValidationError(res...)
- }
- return nil
-}
-
-func (m *PolicyParams) validateClientEndpoint(formats strfmt.Registry) error {
-
- if err := validate.Required("ClientEndpoint", "body", m.ClientEndpoint); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyParams) 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 *PolicyParams) validateMeid(formats strfmt.Registry) error {
-
- if err := validate.Required("Meid", "body", m.Meid); err != nil {
- return err
- }
-
- return nil
-}
-
-func (m *PolicyParams) validatePolicyActionDefinitions(formats strfmt.Registry) error {
-
- if err := validate.Required("PolicyActionDefinitions", "body", m.PolicyActionDefinitions); err != nil {
- return err
- }
-
- if m.PolicyActionDefinitions != nil {
- if err := m.PolicyActionDefinitions.Validate(formats); err != nil {
- if ve, ok := err.(*errors.Validation); ok {
- return ve.ValidateName("PolicyActionDefinitions")
- }
- return err
- }
- }
-
- return nil
-}
-
-func (m *PolicyParams) validateRANFunctionID(formats strfmt.Registry) error {
-
- if err := validate.Required("RANFunctionID", "body", m.RANFunctionID); err != nil {
- return err
- }
-
- return nil
-}
-
-// MarshalBinary interface implementation
-func (m *PolicyParams) MarshalBinary() ([]byte, error) {
- if m == nil {
- return nil, nil
- }
- return swag.WriteJSON(m)
-}
-
-// UnmarshalBinary interface implementation
-func (m *PolicyParams) UnmarshalBinary(b []byte) error {
- var res PolicyParams
- if err := swag.ReadJSON(b, &res); err != nil {
- return err
- }
- *m = res
- return nil
-}