// 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"
)

// GetCorporationsCorporationIDWalletsOKBodyItems get_corporations_corporation_id_wallets_200_ok
//
// 200 ok object
// swagger:model getCorporationsCorporationIdWalletsOKBodyItems

type GetCorporationsCorporationIDWalletsOKBodyItems struct {

	// get_corporations_corporation_id_wallets_balance
	//
	// balance number
	// Required: true
	Balance *float32 `json:"balance"`

	// get_corporations_corporation_id_wallets_division
	//
	// division integer
	// Required: true
	// Maximum: 7
	// Minimum: 1
	Division *int32 `json:"division"`
}

/* polymorph getCorporationsCorporationIdWalletsOKBodyItems balance false */

/* polymorph getCorporationsCorporationIdWalletsOKBodyItems division false */

// Validate validates this get corporations corporation Id wallets o k body items
func (m *GetCorporationsCorporationIDWalletsOKBodyItems) Validate(formats strfmt.Registry) error {
	var res []error

	if err := m.validateBalance(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if err := m.validateDivision(formats); err != nil {
		// prop
		res = append(res, err)
	}

	if len(res) > 0 {
		return errors.CompositeValidationError(res...)
	}
	return nil
}

func (m *GetCorporationsCorporationIDWalletsOKBodyItems) validateBalance(formats strfmt.Registry) error {

	if err := validate.Required("balance", "body", m.Balance); err != nil {
		return err
	}

	return nil
}

func (m *GetCorporationsCorporationIDWalletsOKBodyItems) validateDivision(formats strfmt.Registry) error {

	if err := validate.Required("division", "body", m.Division); err != nil {
		return err
	}

	if err := validate.MinimumInt("division", "body", int64(*m.Division), 1, false); err != nil {
		return err
	}

	if err := validate.MaximumInt("division", "body", int64(*m.Division), 7, false); err != nil {
		return err
	}

	return nil
}

// MarshalBinary interface implementation
func (m *GetCorporationsCorporationIDWalletsOKBodyItems) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}

// UnmarshalBinary interface implementation
func (m *GetCorporationsCorporationIDWalletsOKBodyItems) UnmarshalBinary(b []byte) error {
	var res GetCorporationsCorporationIDWalletsOKBodyItems
	if err := swag.ReadJSON(b, &res); err != nil {
		return err
	}
	*m = res
	return nil
}
