lib/api/geo/geo_models/state.go

190 lines
4.0 KiB
Go
Raw Normal View History

2021-01-08 17:40:28 +00:00
// Code generated by go-swagger; DO NOT EDIT.
// All Code Copyright(c) 2018-2020 by Taxnexus, Inc.
// All rights reserved worldwide.
// Proprietary product; unlicensed use is not allowed
package geo_models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// State state
//
// swagger:model State
type State struct {
// Account
AccountID string `json:"AccountID,omitempty"`
// Rollup Amount
Amount float64 `json:"Amount,omitempty"`
// State Code
Code string `json:"Code,omitempty"`
// Contact
ContactID string `json:"ContactID,omitempty"`
// Country
CountryID string `json:"CountryID,omitempty"`
// Division
Division string `json:"Division,omitempty"`
// Enrollment Status
EnrollmentStatus string `json:"EnrollmentStatus,omitempty"`
// FIPS
FIPS string `json:"FIPS,omitempty"`
// GNIS
GNIS int64 `json:"GNIS,omitempty"`
// State Geocode
Geocode string `json:"Geocode,omitempty"`
// Taxnexus Record Id
ID string `json:"ID,omitempty"`
// Interest
Interest float64 `json:"Interest,omitempty"`
// Land Area
LandArea int64 `json:"LandArea,omitempty"`
// Latitude of the center of this geographic entity
Latitude float64 `json:"Latitude,omitempty"`
// Longitude of the center of this geographic entity
Longitude float64 `json:"Longitude,omitempty"`
// State Name
Name string `json:"Name,omitempty"`
// Penalty
Penalty float64 `json:"Penalty,omitempty"`
// Source System identifier for this record, if any
Ref string `json:"Ref,omitempty"`
// Region
Region string `json:"Region,omitempty"`
// Reported Adjustments
ReportedAdjustments float64 `json:"ReportedAdjustments,omitempty"`
// Reported Deductions
ReportedDeductions float64 `json:"ReportedDeductions,omitempty"`
// Reported Net Revenue
ReportedNetRevenue float64 `json:"ReportedNetRevenue,omitempty"`
// Reported Rate
ReportedRate float64 `json:"ReportedRate,omitempty"`
// Reported Revenue
ReportedRevenue float64 `json:"ReportedRevenue,omitempty"`
// Rollup Revenue Base
RevenueBase float64 `json:"RevenueBase,omitempty"`
// Rollup Revenue Net
RevenueNet float64 `json:"RevenueNet,omitempty"`
// Rollup Revenue Not Taxable
RevenueNotTaxable float64 `json:"RevenueNotTaxable,omitempty"`
// SGC
SGC string `json:"SGC,omitempty"`
// Document Status
Status string `json:"Status,omitempty"`
// Reported Tax
Subtotal float64 `json:"Subtotal,omitempty"`
// tax instances
TaxInstances []*TaxInstance `json:"TaxInstances"`
// Template
TemplateID string `json:"TemplateID,omitempty"`
// Total Amount
TotalAmount float64 `json:"TotalAmount,omitempty"`
// Total Area
TotalArea int64 `json:"TotalArea,omitempty"`
// Unit Base
UnitBase float64 `json:"UnitBase,omitempty"`
// Water Area
WaterArea int64 `json:"WaterArea,omitempty"`
}
// Validate validates this state
func (m *State) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateTaxInstances(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *State) validateTaxInstances(formats strfmt.Registry) error {
if swag.IsZero(m.TaxInstances) { // not required
return nil
}
for i := 0; i < len(m.TaxInstances); i++ {
if swag.IsZero(m.TaxInstances[i]) { // not required
continue
}
if m.TaxInstances[i] != nil {
if err := m.TaxInstances[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("TaxInstances" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *State) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *State) UnmarshalBinary(b []byte) error {
var res State
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}