881 lines
22 KiB
Go
881 lines
22 KiB
Go
package dogma
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
"strconv"
|
|
|
|
"github.com/go-openapi/errors"
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/swag"
|
|
"github.com/go-openapi/validate"
|
|
|
|
strfmt "github.com/go-openapi/strfmt"
|
|
)
|
|
|
|
// GetDogmaEffectsEffectIDReader is a Reader for the GetDogmaEffectsEffectID structure.
|
|
type GetDogmaEffectsEffectIDReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetDogmaEffectsEffectIDReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
result := NewGetDogmaEffectsEffectIDOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
|
|
case 404:
|
|
result := NewGetDogmaEffectsEffectIDNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
case 500:
|
|
result := NewGetDogmaEffectsEffectIDInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
|
|
default:
|
|
return nil, runtime.NewAPIError("unknown error", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewGetDogmaEffectsEffectIDOK creates a GetDogmaEffectsEffectIDOK with default headers values
|
|
func NewGetDogmaEffectsEffectIDOK() *GetDogmaEffectsEffectIDOK {
|
|
return &GetDogmaEffectsEffectIDOK{}
|
|
}
|
|
|
|
/*GetDogmaEffectsEffectIDOK handles this case with default header values.
|
|
|
|
Information about a dogma effect
|
|
*/
|
|
type GetDogmaEffectsEffectIDOK struct {
|
|
/*The caching mechanism used
|
|
*/
|
|
CacheControl string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
Expires string
|
|
/*RFC7231 formatted datetime string
|
|
*/
|
|
LastModified string
|
|
|
|
Payload GetDogmaEffectsEffectIDOKBody
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOK) Error() string {
|
|
return fmt.Sprintf("[GET /dogma/effects/{effect_id}/][%d] getDogmaEffectsEffectIdOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response header Cache-Control
|
|
o.CacheControl = response.GetHeader("Cache-Control")
|
|
|
|
// response header Expires
|
|
o.Expires = response.GetHeader("Expires")
|
|
|
|
// response header Last-Modified
|
|
o.LastModified = response.GetHeader("Last-Modified")
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetDogmaEffectsEffectIDNotFound creates a GetDogmaEffectsEffectIDNotFound with default headers values
|
|
func NewGetDogmaEffectsEffectIDNotFound() *GetDogmaEffectsEffectIDNotFound {
|
|
return &GetDogmaEffectsEffectIDNotFound{}
|
|
}
|
|
|
|
/*GetDogmaEffectsEffectIDNotFound handles this case with default header values.
|
|
|
|
Dogma effect not found
|
|
*/
|
|
type GetDogmaEffectsEffectIDNotFound struct {
|
|
Payload GetDogmaEffectsEffectIDNotFoundBody
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /dogma/effects/{effect_id}/][%d] getDogmaEffectsEffectIdNotFound %+v", 404, o.Payload)
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetDogmaEffectsEffectIDInternalServerError creates a GetDogmaEffectsEffectIDInternalServerError with default headers values
|
|
func NewGetDogmaEffectsEffectIDInternalServerError() *GetDogmaEffectsEffectIDInternalServerError {
|
|
return &GetDogmaEffectsEffectIDInternalServerError{}
|
|
}
|
|
|
|
/*GetDogmaEffectsEffectIDInternalServerError handles this case with default header values.
|
|
|
|
Internal server error
|
|
*/
|
|
type GetDogmaEffectsEffectIDInternalServerError struct {
|
|
Payload GetDogmaEffectsEffectIDInternalServerErrorBody
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /dogma/effects/{effect_id}/][%d] getDogmaEffectsEffectIdInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
/*GetDogmaEffectsEffectIDInternalServerErrorBody get_dogma_effects_effect_id_internal_server_error
|
|
//
|
|
// Internal server error
|
|
swagger:model GetDogmaEffectsEffectIDInternalServerErrorBody
|
|
*/
|
|
type GetDogmaEffectsEffectIDInternalServerErrorBody struct {
|
|
|
|
// get_dogma_effects_effect_id_500_internal_server_error
|
|
//
|
|
// Internal server error message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this get dogma effects effect ID internal server error body
|
|
func (o *GetDogmaEffectsEffectIDInternalServerErrorBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDInternalServerErrorBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdInternalServerError"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetDogmaEffectsEffectIDInternalServerErrorBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetDogmaEffectsEffectIDInternalServerErrorBody) UnmarshalBinary(b []byte) error {
|
|
var res GetDogmaEffectsEffectIDInternalServerErrorBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetDogmaEffectsEffectIDNotFoundBody get_dogma_effects_effect_id_not_found
|
|
//
|
|
// Not found
|
|
swagger:model GetDogmaEffectsEffectIDNotFoundBody
|
|
*/
|
|
type GetDogmaEffectsEffectIDNotFoundBody struct {
|
|
|
|
// get_dogma_effects_effect_id_404_not_found
|
|
//
|
|
// Not found message
|
|
// Required: true
|
|
Error *string `json:"error"`
|
|
}
|
|
|
|
// Validate validates this get dogma effects effect ID not found body
|
|
func (o *GetDogmaEffectsEffectIDNotFoundBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateError(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDNotFoundBody) validateError(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdNotFound"+"."+"error", "body", o.Error); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetDogmaEffectsEffectIDNotFoundBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetDogmaEffectsEffectIDNotFoundBody) UnmarshalBinary(b []byte) error {
|
|
var res GetDogmaEffectsEffectIDNotFoundBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*GetDogmaEffectsEffectIDOKBody get_dogma_effects_effect_id_ok
|
|
//
|
|
// 200 ok object
|
|
swagger:model GetDogmaEffectsEffectIDOKBody
|
|
*/
|
|
type GetDogmaEffectsEffectIDOKBody struct {
|
|
|
|
// get_dogma_effects_effect_id_description
|
|
//
|
|
// description string
|
|
// Required: true
|
|
Description *string `json:"description"`
|
|
|
|
// get_dogma_effects_effect_id_disallow_auto_repeat
|
|
//
|
|
// disallow_auto_repeat boolean
|
|
// Required: true
|
|
DisallowAutoRepeat *bool `json:"disallow_auto_repeat"`
|
|
|
|
// get_dogma_effects_effect_id_discharge_attribute_id
|
|
//
|
|
// discharge_attribute_id integer
|
|
// Required: true
|
|
DischargeAttributeID *int32 `json:"discharge_attribute_id"`
|
|
|
|
// get_dogma_effects_effect_id_display_name
|
|
//
|
|
// display_name string
|
|
// Required: true
|
|
DisplayName *string `json:"display_name"`
|
|
|
|
// get_dogma_effects_effect_id_duration_attribute_id
|
|
//
|
|
// duration_attribute_id integer
|
|
// Required: true
|
|
DurationAttributeID *int32 `json:"duration_attribute_id"`
|
|
|
|
// get_dogma_effects_effect_id_effect_category
|
|
//
|
|
// effect_category integer
|
|
// Required: true
|
|
EffectCategory *int32 `json:"effect_category"`
|
|
|
|
// get_dogma_effects_effect_id_effect_id
|
|
//
|
|
// effect_id integer
|
|
// Required: true
|
|
EffectID *int32 `json:"effect_id"`
|
|
|
|
// get_dogma_effects_effect_id_electronic_chance
|
|
//
|
|
// electronic_chance boolean
|
|
// Required: true
|
|
ElectronicChance *bool `json:"electronic_chance"`
|
|
|
|
// get_dogma_effects_effect_id_falloff_attribute_id
|
|
//
|
|
// falloff_attribute_id integer
|
|
// Required: true
|
|
FalloffAttributeID *int32 `json:"falloff_attribute_id"`
|
|
|
|
// get_dogma_effects_effect_id_icon_id
|
|
//
|
|
// icon_id integer
|
|
// Required: true
|
|
IconID *int32 `json:"icon_id"`
|
|
|
|
// get_dogma_effects_effect_id_is_assistance
|
|
//
|
|
// is_assistance boolean
|
|
// Required: true
|
|
IsAssistance *bool `json:"is_assistance"`
|
|
|
|
// get_dogma_effects_effect_id_is_offensive
|
|
//
|
|
// is_offensive boolean
|
|
// Required: true
|
|
IsOffensive *bool `json:"is_offensive"`
|
|
|
|
// get_dogma_effects_effect_id_is_warp_safe
|
|
//
|
|
// is_warp_safe boolean
|
|
// Required: true
|
|
IsWarpSafe *bool `json:"is_warp_safe"`
|
|
|
|
// get_dogma_effects_effect_id_modifiers
|
|
//
|
|
// modifiers array
|
|
// Required: true
|
|
// Max Items: 100
|
|
Modifiers []*ModifiersItems0 `json:"modifiers"`
|
|
|
|
// get_dogma_effects_effect_id_name
|
|
//
|
|
// name string
|
|
// Required: true
|
|
Name *string `json:"name"`
|
|
|
|
// get_dogma_effects_effect_id_post_expression
|
|
//
|
|
// post_expression integer
|
|
// Required: true
|
|
PostExpression *int32 `json:"post_expression"`
|
|
|
|
// get_dogma_effects_effect_id_pre_expression
|
|
//
|
|
// pre_expression integer
|
|
// Required: true
|
|
PreExpression *int32 `json:"pre_expression"`
|
|
|
|
// get_dogma_effects_effect_id_published
|
|
//
|
|
// published boolean
|
|
// Required: true
|
|
Published *bool `json:"published"`
|
|
|
|
// get_dogma_effects_effect_id_range_attribute_id
|
|
//
|
|
// range_attribute_id integer
|
|
// Required: true
|
|
RangeAttributeID *int32 `json:"range_attribute_id"`
|
|
|
|
// get_dogma_effects_effect_id_range_chance
|
|
//
|
|
// range_chance boolean
|
|
// Required: true
|
|
RangeChance *bool `json:"range_chance"`
|
|
|
|
// get_dogma_effects_effect_id_tracking_speed_attribute_id
|
|
//
|
|
// tracking_speed_attribute_id integer
|
|
// Required: true
|
|
TrackingSpeedAttributeID *int32 `json:"tracking_speed_attribute_id"`
|
|
}
|
|
|
|
// Validate validates this get dogma effects effect ID o k body
|
|
func (o *GetDogmaEffectsEffectIDOKBody) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateDescription(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateDisallowAutoRepeat(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateDischargeAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateDisplayName(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateDurationAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateEffectCategory(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateEffectID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateElectronicChance(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateFalloffAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateIconID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateIsAssistance(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateIsOffensive(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateIsWarpSafe(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateModifiers(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateName(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validatePostExpression(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validatePreExpression(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validatePublished(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateRangeAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateRangeChance(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateTrackingSpeedAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateDescription(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"description", "body", o.Description); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateDisallowAutoRepeat(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"disallow_auto_repeat", "body", o.DisallowAutoRepeat); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateDischargeAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"discharge_attribute_id", "body", o.DischargeAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateDisplayName(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"display_name", "body", o.DisplayName); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateDurationAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"duration_attribute_id", "body", o.DurationAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateEffectCategory(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"effect_category", "body", o.EffectCategory); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateEffectID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"effect_id", "body", o.EffectID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateElectronicChance(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"electronic_chance", "body", o.ElectronicChance); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateFalloffAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"falloff_attribute_id", "body", o.FalloffAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateIconID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"icon_id", "body", o.IconID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateIsAssistance(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"is_assistance", "body", o.IsAssistance); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateIsOffensive(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"is_offensive", "body", o.IsOffensive); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateIsWarpSafe(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"is_warp_safe", "body", o.IsWarpSafe); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateModifiers(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"modifiers", "body", o.Modifiers); err != nil {
|
|
return err
|
|
}
|
|
|
|
iModifiersSize := int64(len(o.Modifiers))
|
|
|
|
if err := validate.MaxItems("getDogmaEffectsEffectIdOK"+"."+"modifiers", "body", iModifiersSize, 100); err != nil {
|
|
return err
|
|
}
|
|
|
|
for i := 0; i < len(o.Modifiers); i++ {
|
|
|
|
if swag.IsZero(o.Modifiers[i]) { // not required
|
|
continue
|
|
}
|
|
|
|
if o.Modifiers[i] != nil {
|
|
|
|
if err := o.Modifiers[i].Validate(formats); err != nil {
|
|
if ve, ok := err.(*errors.Validation); ok {
|
|
return ve.ValidateName("getDogmaEffectsEffectIdOK" + "." + "modifiers" + "." + strconv.Itoa(i))
|
|
}
|
|
return err
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateName(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"name", "body", o.Name); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validatePostExpression(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"post_expression", "body", o.PostExpression); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validatePreExpression(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"pre_expression", "body", o.PreExpression); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validatePublished(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"published", "body", o.Published); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateRangeAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"range_attribute_id", "body", o.RangeAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateRangeChance(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"range_chance", "body", o.RangeChance); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *GetDogmaEffectsEffectIDOKBody) validateTrackingSpeedAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("getDogmaEffectsEffectIdOK"+"."+"tracking_speed_attribute_id", "body", o.TrackingSpeedAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *GetDogmaEffectsEffectIDOKBody) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *GetDogmaEffectsEffectIDOKBody) UnmarshalBinary(b []byte) error {
|
|
var res GetDogmaEffectsEffectIDOKBody
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|
|
|
|
/*ModifiersItems0 get_dogma_effects_effect_id_modifier
|
|
//
|
|
// modifier object
|
|
swagger:model ModifiersItems0
|
|
*/
|
|
type ModifiersItems0 struct {
|
|
|
|
// get_dogma_effects_effect_id_domain
|
|
//
|
|
// domain string
|
|
// Required: true
|
|
Domain *string `json:"domain"`
|
|
|
|
// get_dogma_effects_effect_id_func
|
|
//
|
|
// func string
|
|
// Required: true
|
|
Func *string `json:"func"`
|
|
|
|
// get_dogma_effects_effect_id_modified_attribute_id
|
|
//
|
|
// modified_attribute_id integer
|
|
// Required: true
|
|
ModifiedAttributeID *int32 `json:"modified_attribute_id"`
|
|
|
|
// get_dogma_effects_effect_id_modifying_attribute_id
|
|
//
|
|
// modifying_attribute_id integer
|
|
// Required: true
|
|
ModifyingAttributeID *int32 `json:"modifying_attribute_id"`
|
|
|
|
// get_dogma_effects_effect_id_operator
|
|
//
|
|
// operator integer
|
|
// Required: true
|
|
Operator *int32 `json:"operator"`
|
|
}
|
|
|
|
// Validate validates this modifiers items0
|
|
func (o *ModifiersItems0) Validate(formats strfmt.Registry) error {
|
|
var res []error
|
|
|
|
if err := o.validateDomain(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateFunc(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateModifiedAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateModifyingAttributeID(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if err := o.validateOperator(formats); err != nil {
|
|
// prop
|
|
res = append(res, err)
|
|
}
|
|
|
|
if len(res) > 0 {
|
|
return errors.CompositeValidationError(res...)
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (o *ModifiersItems0) validateDomain(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("domain", "body", o.Domain); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *ModifiersItems0) validateFunc(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("func", "body", o.Func); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *ModifiersItems0) validateModifiedAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("modified_attribute_id", "body", o.ModifiedAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *ModifiersItems0) validateModifyingAttributeID(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("modifying_attribute_id", "body", o.ModifyingAttributeID); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (o *ModifiersItems0) validateOperator(formats strfmt.Registry) error {
|
|
|
|
if err := validate.Required("operator", "body", o.Operator); err != nil {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (o *ModifiersItems0) MarshalBinary() ([]byte, error) {
|
|
if o == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(o)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (o *ModifiersItems0) UnmarshalBinary(b []byte) error {
|
|
var res ModifiersItems0
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*o = res
|
|
return nil
|
|
}
|