forked from lthn/blockchain
This pull request introduces a comprehensive new API interface for the blockchain, leveraging OpenAPI v3 to facilitate direct consumption of chain data by GUI and web applications. This change significantly refines the project's build infrastructure, incorporating Conan for dependency management and CMake for configuration, alongside the integration of an OpenAPI Generator to produce SDKs for multiple languages. ### Highlights * **New API Interface**: Introduced a new API interface using OpenAPI v3 to enable GUI/WEB development to consume chain data without needing custom server applications. * **Build System Enhancements**: Significant updates to the build system, including Makefile, CMake, and Conan configurations, to streamline the build process and support new functionalities. * **Multi-language SDK Generation**: Integrated OpenAPI Generator to automatically create SDKs for various programming languages, including Go, Angular, and PHP, simplifying client-side integration.
229 lines
5.7 KiB
Go
Generated
229 lines
5.7 KiB
Go
Generated
/*
|
|
Lethean Blockchain API
|
|
|
|
OpenAPI for Lethean Blockchain
|
|
|
|
API version: 6.0.1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package lthn
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the DbStatInfoModel type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &DbStatInfoModel{}
|
|
|
|
// DbStatInfoModel struct for DbStatInfoModel
|
|
type DbStatInfoModel struct {
|
|
TxCount *int32 `json:"tx_count,omitempty"`
|
|
WriteTxCount *int32 `json:"write_tx_count,omitempty"`
|
|
MapSize *int32 `json:"map_size,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _DbStatInfoModel DbStatInfoModel
|
|
|
|
// NewDbStatInfoModel instantiates a new DbStatInfoModel object
|
|
// This constructor will assign default values to properties that have it defined,
|
|
// and makes sure properties required by API are set, but the set of arguments
|
|
// will change when the set of required properties is changed
|
|
func NewDbStatInfoModel() *DbStatInfoModel {
|
|
this := DbStatInfoModel{}
|
|
return &this
|
|
}
|
|
|
|
// NewDbStatInfoModelWithDefaults instantiates a new DbStatInfoModel object
|
|
// This constructor will only assign default values to properties that have it defined,
|
|
// but it doesn't guarantee that properties required by API are set
|
|
func NewDbStatInfoModelWithDefaults() *DbStatInfoModel {
|
|
this := DbStatInfoModel{}
|
|
return &this
|
|
}
|
|
|
|
// GetTxCount returns the TxCount field value if set, zero value otherwise.
|
|
func (o *DbStatInfoModel) GetTxCount() int32 {
|
|
if o == nil || IsNil(o.TxCount) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.TxCount
|
|
}
|
|
|
|
// GetTxCountOk returns a tuple with the TxCount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DbStatInfoModel) GetTxCountOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.TxCount) {
|
|
return nil, false
|
|
}
|
|
return o.TxCount, true
|
|
}
|
|
|
|
// HasTxCount returns a boolean if a field has been set.
|
|
func (o *DbStatInfoModel) HasTxCount() bool {
|
|
if o != nil && !IsNil(o.TxCount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTxCount gets a reference to the given int32 and assigns it to the TxCount field.
|
|
func (o *DbStatInfoModel) SetTxCount(v int32) {
|
|
o.TxCount = &v
|
|
}
|
|
|
|
// GetWriteTxCount returns the WriteTxCount field value if set, zero value otherwise.
|
|
func (o *DbStatInfoModel) GetWriteTxCount() int32 {
|
|
if o == nil || IsNil(o.WriteTxCount) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.WriteTxCount
|
|
}
|
|
|
|
// GetWriteTxCountOk returns a tuple with the WriteTxCount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DbStatInfoModel) GetWriteTxCountOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.WriteTxCount) {
|
|
return nil, false
|
|
}
|
|
return o.WriteTxCount, true
|
|
}
|
|
|
|
// HasWriteTxCount returns a boolean if a field has been set.
|
|
func (o *DbStatInfoModel) HasWriteTxCount() bool {
|
|
if o != nil && !IsNil(o.WriteTxCount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetWriteTxCount gets a reference to the given int32 and assigns it to the WriteTxCount field.
|
|
func (o *DbStatInfoModel) SetWriteTxCount(v int32) {
|
|
o.WriteTxCount = &v
|
|
}
|
|
|
|
// GetMapSize returns the MapSize field value if set, zero value otherwise.
|
|
func (o *DbStatInfoModel) GetMapSize() int32 {
|
|
if o == nil || IsNil(o.MapSize) {
|
|
var ret int32
|
|
return ret
|
|
}
|
|
return *o.MapSize
|
|
}
|
|
|
|
// GetMapSizeOk returns a tuple with the MapSize field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DbStatInfoModel) GetMapSizeOk() (*int32, bool) {
|
|
if o == nil || IsNil(o.MapSize) {
|
|
return nil, false
|
|
}
|
|
return o.MapSize, true
|
|
}
|
|
|
|
// HasMapSize returns a boolean if a field has been set.
|
|
func (o *DbStatInfoModel) HasMapSize() bool {
|
|
if o != nil && !IsNil(o.MapSize) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMapSize gets a reference to the given int32 and assigns it to the MapSize field.
|
|
func (o *DbStatInfoModel) SetMapSize(v int32) {
|
|
o.MapSize = &v
|
|
}
|
|
|
|
func (o DbStatInfoModel) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o DbStatInfoModel) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.TxCount) {
|
|
toSerialize["tx_count"] = o.TxCount
|
|
}
|
|
if !IsNil(o.WriteTxCount) {
|
|
toSerialize["write_tx_count"] = o.WriteTxCount
|
|
}
|
|
if !IsNil(o.MapSize) {
|
|
toSerialize["map_size"] = o.MapSize
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *DbStatInfoModel) UnmarshalJSON(data []byte) (err error) {
|
|
varDbStatInfoModel := _DbStatInfoModel{}
|
|
|
|
err = json.Unmarshal(data, &varDbStatInfoModel)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = DbStatInfoModel(varDbStatInfoModel)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "tx_count")
|
|
delete(additionalProperties, "write_tx_count")
|
|
delete(additionalProperties, "map_size")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableDbStatInfoModel struct {
|
|
value *DbStatInfoModel
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDbStatInfoModel) Get() *DbStatInfoModel {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDbStatInfoModel) Set(val *DbStatInfoModel) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDbStatInfoModel) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDbStatInfoModel) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDbStatInfoModel(val *DbStatInfoModel) *NullableDbStatInfoModel {
|
|
return &NullableDbStatInfoModel{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDbStatInfoModel) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDbStatInfoModel) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|