92 lines
2 KiB
Go
92 lines
2 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
// 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"
|
|
)
|
|
|
|
// GetInsurancePricesOKBodyItems get_insurance_prices_200_ok
|
|
//
|
|
// 200 ok object
|
|
// swagger:model getInsurancePricesOKBodyItems
|
|
|
|
type GetInsurancePricesOKBodyItems struct {
|
|
|
|
// levels
|
|
// Required: true
|
|
Levels GetInsurancePricesOKBodyItemsLevels `json:"levels"`
|
|
|
|
// get_insurance_prices_type_id
|
|
//
|
|
// type_id integer
|
|
// Required: true
|
|
TypeID *int32 `json:"type_id"`
|
|
}
|
|
|
|
/* polymorph getInsurancePricesOKBodyItems levels false */
|
|
|
|
/* polymorph getInsurancePricesOKBodyItems type_id false */
|
|
|
|
// Validate validates this get insurance prices o k body items
|
|
func (m *GetInsurancePricesOKBodyItems) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := m.validateLevels(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := m.validateTypeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (m *GetInsurancePricesOKBodyItems) validateLevels(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("levels", "body", m.Levels); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (m *GetInsurancePricesOKBodyItems) validateTypeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("type_id", "body", m.TypeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *GetInsurancePricesOKBodyItems) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *GetInsurancePricesOKBodyItems) UnmarshalBinary(b []byte) error {
|
|
var res GetInsurancePricesOKBodyItems
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|