Initial cloud-services repo - gateway service + pkg modules
This commit is contained in:
88
pkg/ota_api/models/handlers_sub_feature_assign_request.go
Normal file
88
pkg/ota_api/models/handlers_sub_feature_assign_request.go
Normal file
@@ -0,0 +1,88 @@
|
||||
// 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 (
|
||||
"context"
|
||||
|
||||
"github.com/go-openapi/errors"
|
||||
"github.com/go-openapi/strfmt"
|
||||
"github.com/go-openapi/swag"
|
||||
"github.com/go-openapi/validate"
|
||||
)
|
||||
|
||||
// HandlersSubFeatureAssignRequest handlers sub feature assign request
|
||||
//
|
||||
// swagger:model handlers.SubFeatureAssignRequest
|
||||
type HandlersSubFeatureAssignRequest struct {
|
||||
|
||||
// feature id
|
||||
// Required: true
|
||||
FeatureID *string `json:"feature_id"`
|
||||
|
||||
// package id
|
||||
// Required: true
|
||||
PackageID *string `json:"package_id"`
|
||||
}
|
||||
|
||||
// Validate validates this handlers sub feature assign request
|
||||
func (m *HandlersSubFeatureAssignRequest) Validate(formats strfmt.Registry) error {
|
||||
var res []error
|
||||
|
||||
if err := m.validateFeatureID(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if err := m.validatePackageID(formats); err != nil {
|
||||
res = append(res, err)
|
||||
}
|
||||
|
||||
if len(res) > 0 {
|
||||
return errors.CompositeValidationError(res...)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *HandlersSubFeatureAssignRequest) validateFeatureID(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("feature_id", "body", m.FeatureID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (m *HandlersSubFeatureAssignRequest) validatePackageID(formats strfmt.Registry) error {
|
||||
|
||||
if err := validate.Required("package_id", "body", m.PackageID); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
// ContextValidate validates this handlers sub feature assign request based on context it is used
|
||||
func (m *HandlersSubFeatureAssignRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// MarshalBinary interface implementation
|
||||
func (m *HandlersSubFeatureAssignRequest) MarshalBinary() ([]byte, error) {
|
||||
if m == nil {
|
||||
return nil, nil
|
||||
}
|
||||
return swag.WriteJSON(m)
|
||||
}
|
||||
|
||||
// UnmarshalBinary interface implementation
|
||||
func (m *HandlersSubFeatureAssignRequest) UnmarshalBinary(b []byte) error {
|
||||
var res HandlersSubFeatureAssignRequest
|
||||
if err := swag.ReadJSON(b, &res); err != nil {
|
||||
return err
|
||||
}
|
||||
*m = res
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user