1
0
Fork 0
forked from lthn/blockchain
blockchain/utils/sdk/client/go/model_pos_entry_model.go
Snider 88d4357628
New API Interface (#27)
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.
2025-10-19 19:12:37 +01:00

414 lines
11 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 PosEntryModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PosEntryModel{}
// PosEntryModel struct for PosEntryModel
type PosEntryModel struct {
Amount *int32 `json:"amount,omitempty"`
GIndex *int32 `json:"g_index,omitempty"`
Keyimage *string `json:"keyimage,omitempty"`
BlockTimestamp *int32 `json:"block_timestamp,omitempty"`
StakeUnlockTime *int32 `json:"stake_unlock_time,omitempty"`
TxId *string `json:"tx_id,omitempty"`
TxOutIndex *int32 `json:"tx_out_index,omitempty"`
WalletIndex *int32 `json:"wallet_index,omitempty"`
AdditionalProperties map[string]interface{}
}
type _PosEntryModel PosEntryModel
// NewPosEntryModel instantiates a new PosEntryModel 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 NewPosEntryModel() *PosEntryModel {
this := PosEntryModel{}
return &this
}
// NewPosEntryModelWithDefaults instantiates a new PosEntryModel 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 NewPosEntryModelWithDefaults() *PosEntryModel {
this := PosEntryModel{}
return &this
}
// GetAmount returns the Amount field value if set, zero value otherwise.
func (o *PosEntryModel) GetAmount() int32 {
if o == nil || IsNil(o.Amount) {
var ret int32
return ret
}
return *o.Amount
}
// GetAmountOk returns a tuple with the Amount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetAmountOk() (*int32, bool) {
if o == nil || IsNil(o.Amount) {
return nil, false
}
return o.Amount, true
}
// HasAmount returns a boolean if a field has been set.
func (o *PosEntryModel) HasAmount() bool {
if o != nil && !IsNil(o.Amount) {
return true
}
return false
}
// SetAmount gets a reference to the given int32 and assigns it to the Amount field.
func (o *PosEntryModel) SetAmount(v int32) {
o.Amount = &v
}
// GetGIndex returns the GIndex field value if set, zero value otherwise.
func (o *PosEntryModel) GetGIndex() int32 {
if o == nil || IsNil(o.GIndex) {
var ret int32
return ret
}
return *o.GIndex
}
// GetGIndexOk returns a tuple with the GIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetGIndexOk() (*int32, bool) {
if o == nil || IsNil(o.GIndex) {
return nil, false
}
return o.GIndex, true
}
// HasGIndex returns a boolean if a field has been set.
func (o *PosEntryModel) HasGIndex() bool {
if o != nil && !IsNil(o.GIndex) {
return true
}
return false
}
// SetGIndex gets a reference to the given int32 and assigns it to the GIndex field.
func (o *PosEntryModel) SetGIndex(v int32) {
o.GIndex = &v
}
// GetKeyimage returns the Keyimage field value if set, zero value otherwise.
func (o *PosEntryModel) GetKeyimage() string {
if o == nil || IsNil(o.Keyimage) {
var ret string
return ret
}
return *o.Keyimage
}
// GetKeyimageOk returns a tuple with the Keyimage field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetKeyimageOk() (*string, bool) {
if o == nil || IsNil(o.Keyimage) {
return nil, false
}
return o.Keyimage, true
}
// HasKeyimage returns a boolean if a field has been set.
func (o *PosEntryModel) HasKeyimage() bool {
if o != nil && !IsNil(o.Keyimage) {
return true
}
return false
}
// SetKeyimage gets a reference to the given string and assigns it to the Keyimage field.
func (o *PosEntryModel) SetKeyimage(v string) {
o.Keyimage = &v
}
// GetBlockTimestamp returns the BlockTimestamp field value if set, zero value otherwise.
func (o *PosEntryModel) GetBlockTimestamp() int32 {
if o == nil || IsNil(o.BlockTimestamp) {
var ret int32
return ret
}
return *o.BlockTimestamp
}
// GetBlockTimestampOk returns a tuple with the BlockTimestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetBlockTimestampOk() (*int32, bool) {
if o == nil || IsNil(o.BlockTimestamp) {
return nil, false
}
return o.BlockTimestamp, true
}
// HasBlockTimestamp returns a boolean if a field has been set.
func (o *PosEntryModel) HasBlockTimestamp() bool {
if o != nil && !IsNil(o.BlockTimestamp) {
return true
}
return false
}
// SetBlockTimestamp gets a reference to the given int32 and assigns it to the BlockTimestamp field.
func (o *PosEntryModel) SetBlockTimestamp(v int32) {
o.BlockTimestamp = &v
}
// GetStakeUnlockTime returns the StakeUnlockTime field value if set, zero value otherwise.
func (o *PosEntryModel) GetStakeUnlockTime() int32 {
if o == nil || IsNil(o.StakeUnlockTime) {
var ret int32
return ret
}
return *o.StakeUnlockTime
}
// GetStakeUnlockTimeOk returns a tuple with the StakeUnlockTime field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetStakeUnlockTimeOk() (*int32, bool) {
if o == nil || IsNil(o.StakeUnlockTime) {
return nil, false
}
return o.StakeUnlockTime, true
}
// HasStakeUnlockTime returns a boolean if a field has been set.
func (o *PosEntryModel) HasStakeUnlockTime() bool {
if o != nil && !IsNil(o.StakeUnlockTime) {
return true
}
return false
}
// SetStakeUnlockTime gets a reference to the given int32 and assigns it to the StakeUnlockTime field.
func (o *PosEntryModel) SetStakeUnlockTime(v int32) {
o.StakeUnlockTime = &v
}
// GetTxId returns the TxId field value if set, zero value otherwise.
func (o *PosEntryModel) GetTxId() string {
if o == nil || IsNil(o.TxId) {
var ret string
return ret
}
return *o.TxId
}
// GetTxIdOk returns a tuple with the TxId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetTxIdOk() (*string, bool) {
if o == nil || IsNil(o.TxId) {
return nil, false
}
return o.TxId, true
}
// HasTxId returns a boolean if a field has been set.
func (o *PosEntryModel) HasTxId() bool {
if o != nil && !IsNil(o.TxId) {
return true
}
return false
}
// SetTxId gets a reference to the given string and assigns it to the TxId field.
func (o *PosEntryModel) SetTxId(v string) {
o.TxId = &v
}
// GetTxOutIndex returns the TxOutIndex field value if set, zero value otherwise.
func (o *PosEntryModel) GetTxOutIndex() int32 {
if o == nil || IsNil(o.TxOutIndex) {
var ret int32
return ret
}
return *o.TxOutIndex
}
// GetTxOutIndexOk returns a tuple with the TxOutIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetTxOutIndexOk() (*int32, bool) {
if o == nil || IsNil(o.TxOutIndex) {
return nil, false
}
return o.TxOutIndex, true
}
// HasTxOutIndex returns a boolean if a field has been set.
func (o *PosEntryModel) HasTxOutIndex() bool {
if o != nil && !IsNil(o.TxOutIndex) {
return true
}
return false
}
// SetTxOutIndex gets a reference to the given int32 and assigns it to the TxOutIndex field.
func (o *PosEntryModel) SetTxOutIndex(v int32) {
o.TxOutIndex = &v
}
// GetWalletIndex returns the WalletIndex field value if set, zero value otherwise.
func (o *PosEntryModel) GetWalletIndex() int32 {
if o == nil || IsNil(o.WalletIndex) {
var ret int32
return ret
}
return *o.WalletIndex
}
// GetWalletIndexOk returns a tuple with the WalletIndex field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PosEntryModel) GetWalletIndexOk() (*int32, bool) {
if o == nil || IsNil(o.WalletIndex) {
return nil, false
}
return o.WalletIndex, true
}
// HasWalletIndex returns a boolean if a field has been set.
func (o *PosEntryModel) HasWalletIndex() bool {
if o != nil && !IsNil(o.WalletIndex) {
return true
}
return false
}
// SetWalletIndex gets a reference to the given int32 and assigns it to the WalletIndex field.
func (o *PosEntryModel) SetWalletIndex(v int32) {
o.WalletIndex = &v
}
func (o PosEntryModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o PosEntryModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Amount) {
toSerialize["amount"] = o.Amount
}
if !IsNil(o.GIndex) {
toSerialize["g_index"] = o.GIndex
}
if !IsNil(o.Keyimage) {
toSerialize["keyimage"] = o.Keyimage
}
if !IsNil(o.BlockTimestamp) {
toSerialize["block_timestamp"] = o.BlockTimestamp
}
if !IsNil(o.StakeUnlockTime) {
toSerialize["stake_unlock_time"] = o.StakeUnlockTime
}
if !IsNil(o.TxId) {
toSerialize["tx_id"] = o.TxId
}
if !IsNil(o.TxOutIndex) {
toSerialize["tx_out_index"] = o.TxOutIndex
}
if !IsNil(o.WalletIndex) {
toSerialize["wallet_index"] = o.WalletIndex
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *PosEntryModel) UnmarshalJSON(data []byte) (err error) {
varPosEntryModel := _PosEntryModel{}
err = json.Unmarshal(data, &varPosEntryModel)
if err != nil {
return err
}
*o = PosEntryModel(varPosEntryModel)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "amount")
delete(additionalProperties, "g_index")
delete(additionalProperties, "keyimage")
delete(additionalProperties, "block_timestamp")
delete(additionalProperties, "stake_unlock_time")
delete(additionalProperties, "tx_id")
delete(additionalProperties, "tx_out_index")
delete(additionalProperties, "wallet_index")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullablePosEntryModel struct {
value *PosEntryModel
isSet bool
}
func (v NullablePosEntryModel) Get() *PosEntryModel {
return v.value
}
func (v *NullablePosEntryModel) Set(val *PosEntryModel) {
v.value = val
v.isSet = true
}
func (v NullablePosEntryModel) IsSet() bool {
return v.isSet
}
func (v *NullablePosEntryModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullablePosEntryModel(val *PosEntryModel) *NullablePosEntryModel {
return &NullablePosEntryModel{value: val, isSet: true}
}
func (v NullablePosEntryModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullablePosEntryModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}