1
0
Fork 0
forked from lthn/blockchain
blockchain/utils/sdk/client/go/model_db_stat_info_model.go
Snider 884958b0c7 Add Go SDK client for Lethean Blockchain API
Introduces a generated Go SDK client for the Lethean Blockchain API, including OpenAPI spec, models, API interfaces, documentation, and tests. This enables Go applications to interact with Lethean blockchain endpoints for block, info, and transaction operations.
2025-10-19 14:49:39 +01:00

198 lines
5 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"`
}
// 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
}
return toSerialize, nil
}
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)
}