1
0
Fork 0
forked from lthn/blockchain
blockchain/utils/sdk/client/go/model_transaction_details_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

599 lines
16 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 TransactionDetailsModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TransactionDetailsModel{}
// TransactionDetailsModel struct for TransactionDetailsModel
type TransactionDetailsModel struct {
Amount *int32 `json:"amount,omitempty"`
Attachments []TransactionAttachmentModel `json:"attachments,omitempty"`
Blob *string `json:"blob,omitempty"`
BlobSize *int32 `json:"blob_size,omitempty"`
Extra []TransactionExtraModel `json:"extra,omitempty"`
Fee *int32 `json:"fee,omitempty"`
Id *string `json:"id,omitempty"`
Ins []TransactionInputModel `json:"ins,omitempty"`
KeeperBlock *int64 `json:"keeper_block,omitempty"`
ObjectInJson *string `json:"object_in_json,omitempty"`
Outs []TransactionOutputModel `json:"outs,omitempty"`
PubKey *string `json:"pub_key,omitempty"`
Timestamp *int32 `json:"timestamp,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TransactionDetailsModel TransactionDetailsModel
// NewTransactionDetailsModel instantiates a new TransactionDetailsModel 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 NewTransactionDetailsModel() *TransactionDetailsModel {
this := TransactionDetailsModel{}
return &this
}
// NewTransactionDetailsModelWithDefaults instantiates a new TransactionDetailsModel 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 NewTransactionDetailsModelWithDefaults() *TransactionDetailsModel {
this := TransactionDetailsModel{}
return &this
}
// GetAmount returns the Amount field value if set, zero value otherwise.
func (o *TransactionDetailsModel) 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 *TransactionDetailsModel) 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 *TransactionDetailsModel) 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 *TransactionDetailsModel) SetAmount(v int32) {
o.Amount = &v
}
// GetAttachments returns the Attachments field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetAttachments() []TransactionAttachmentModel {
if o == nil || IsNil(o.Attachments) {
var ret []TransactionAttachmentModel
return ret
}
return o.Attachments
}
// GetAttachmentsOk returns a tuple with the Attachments field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetAttachmentsOk() ([]TransactionAttachmentModel, bool) {
if o == nil || IsNil(o.Attachments) {
return nil, false
}
return o.Attachments, true
}
// HasAttachments returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasAttachments() bool {
if o != nil && !IsNil(o.Attachments) {
return true
}
return false
}
// SetAttachments gets a reference to the given []TransactionAttachmentModel and assigns it to the Attachments field.
func (o *TransactionDetailsModel) SetAttachments(v []TransactionAttachmentModel) {
o.Attachments = v
}
// GetBlob returns the Blob field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetBlob() string {
if o == nil || IsNil(o.Blob) {
var ret string
return ret
}
return *o.Blob
}
// GetBlobOk returns a tuple with the Blob field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetBlobOk() (*string, bool) {
if o == nil || IsNil(o.Blob) {
return nil, false
}
return o.Blob, true
}
// HasBlob returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasBlob() bool {
if o != nil && !IsNil(o.Blob) {
return true
}
return false
}
// SetBlob gets a reference to the given string and assigns it to the Blob field.
func (o *TransactionDetailsModel) SetBlob(v string) {
o.Blob = &v
}
// GetBlobSize returns the BlobSize field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetBlobSize() int32 {
if o == nil || IsNil(o.BlobSize) {
var ret int32
return ret
}
return *o.BlobSize
}
// GetBlobSizeOk returns a tuple with the BlobSize field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetBlobSizeOk() (*int32, bool) {
if o == nil || IsNil(o.BlobSize) {
return nil, false
}
return o.BlobSize, true
}
// HasBlobSize returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasBlobSize() bool {
if o != nil && !IsNil(o.BlobSize) {
return true
}
return false
}
// SetBlobSize gets a reference to the given int32 and assigns it to the BlobSize field.
func (o *TransactionDetailsModel) SetBlobSize(v int32) {
o.BlobSize = &v
}
// GetExtra returns the Extra field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetExtra() []TransactionExtraModel {
if o == nil || IsNil(o.Extra) {
var ret []TransactionExtraModel
return ret
}
return o.Extra
}
// GetExtraOk returns a tuple with the Extra field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetExtraOk() ([]TransactionExtraModel, bool) {
if o == nil || IsNil(o.Extra) {
return nil, false
}
return o.Extra, true
}
// HasExtra returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasExtra() bool {
if o != nil && !IsNil(o.Extra) {
return true
}
return false
}
// SetExtra gets a reference to the given []TransactionExtraModel and assigns it to the Extra field.
func (o *TransactionDetailsModel) SetExtra(v []TransactionExtraModel) {
o.Extra = v
}
// GetFee returns the Fee field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetFee() int32 {
if o == nil || IsNil(o.Fee) {
var ret int32
return ret
}
return *o.Fee
}
// GetFeeOk returns a tuple with the Fee field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetFeeOk() (*int32, bool) {
if o == nil || IsNil(o.Fee) {
return nil, false
}
return o.Fee, true
}
// HasFee returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasFee() bool {
if o != nil && !IsNil(o.Fee) {
return true
}
return false
}
// SetFee gets a reference to the given int32 and assigns it to the Fee field.
func (o *TransactionDetailsModel) SetFee(v int32) {
o.Fee = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *TransactionDetailsModel) SetId(v string) {
o.Id = &v
}
// GetIns returns the Ins field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetIns() []TransactionInputModel {
if o == nil || IsNil(o.Ins) {
var ret []TransactionInputModel
return ret
}
return o.Ins
}
// GetInsOk returns a tuple with the Ins field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetInsOk() ([]TransactionInputModel, bool) {
if o == nil || IsNil(o.Ins) {
return nil, false
}
return o.Ins, true
}
// HasIns returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasIns() bool {
if o != nil && !IsNil(o.Ins) {
return true
}
return false
}
// SetIns gets a reference to the given []TransactionInputModel and assigns it to the Ins field.
func (o *TransactionDetailsModel) SetIns(v []TransactionInputModel) {
o.Ins = v
}
// GetKeeperBlock returns the KeeperBlock field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetKeeperBlock() int64 {
if o == nil || IsNil(o.KeeperBlock) {
var ret int64
return ret
}
return *o.KeeperBlock
}
// GetKeeperBlockOk returns a tuple with the KeeperBlock field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetKeeperBlockOk() (*int64, bool) {
if o == nil || IsNil(o.KeeperBlock) {
return nil, false
}
return o.KeeperBlock, true
}
// HasKeeperBlock returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasKeeperBlock() bool {
if o != nil && !IsNil(o.KeeperBlock) {
return true
}
return false
}
// SetKeeperBlock gets a reference to the given int64 and assigns it to the KeeperBlock field.
func (o *TransactionDetailsModel) SetKeeperBlock(v int64) {
o.KeeperBlock = &v
}
// GetObjectInJson returns the ObjectInJson field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetObjectInJson() string {
if o == nil || IsNil(o.ObjectInJson) {
var ret string
return ret
}
return *o.ObjectInJson
}
// GetObjectInJsonOk returns a tuple with the ObjectInJson field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetObjectInJsonOk() (*string, bool) {
if o == nil || IsNil(o.ObjectInJson) {
return nil, false
}
return o.ObjectInJson, true
}
// HasObjectInJson returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasObjectInJson() bool {
if o != nil && !IsNil(o.ObjectInJson) {
return true
}
return false
}
// SetObjectInJson gets a reference to the given string and assigns it to the ObjectInJson field.
func (o *TransactionDetailsModel) SetObjectInJson(v string) {
o.ObjectInJson = &v
}
// GetOuts returns the Outs field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetOuts() []TransactionOutputModel {
if o == nil || IsNil(o.Outs) {
var ret []TransactionOutputModel
return ret
}
return o.Outs
}
// GetOutsOk returns a tuple with the Outs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetOutsOk() ([]TransactionOutputModel, bool) {
if o == nil || IsNil(o.Outs) {
return nil, false
}
return o.Outs, true
}
// HasOuts returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasOuts() bool {
if o != nil && !IsNil(o.Outs) {
return true
}
return false
}
// SetOuts gets a reference to the given []TransactionOutputModel and assigns it to the Outs field.
func (o *TransactionDetailsModel) SetOuts(v []TransactionOutputModel) {
o.Outs = v
}
// GetPubKey returns the PubKey field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetPubKey() string {
if o == nil || IsNil(o.PubKey) {
var ret string
return ret
}
return *o.PubKey
}
// GetPubKeyOk returns a tuple with the PubKey field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetPubKeyOk() (*string, bool) {
if o == nil || IsNil(o.PubKey) {
return nil, false
}
return o.PubKey, true
}
// HasPubKey returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasPubKey() bool {
if o != nil && !IsNil(o.PubKey) {
return true
}
return false
}
// SetPubKey gets a reference to the given string and assigns it to the PubKey field.
func (o *TransactionDetailsModel) SetPubKey(v string) {
o.PubKey = &v
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *TransactionDetailsModel) GetTimestamp() int32 {
if o == nil || IsNil(o.Timestamp) {
var ret int32
return ret
}
return *o.Timestamp
}
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionDetailsModel) GetTimestampOk() (*int32, bool) {
if o == nil || IsNil(o.Timestamp) {
return nil, false
}
return o.Timestamp, true
}
// HasTimestamp returns a boolean if a field has been set.
func (o *TransactionDetailsModel) HasTimestamp() bool {
if o != nil && !IsNil(o.Timestamp) {
return true
}
return false
}
// SetTimestamp gets a reference to the given int32 and assigns it to the Timestamp field.
func (o *TransactionDetailsModel) SetTimestamp(v int32) {
o.Timestamp = &v
}
func (o TransactionDetailsModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TransactionDetailsModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Amount) {
toSerialize["amount"] = o.Amount
}
if !IsNil(o.Attachments) {
toSerialize["attachments"] = o.Attachments
}
if !IsNil(o.Blob) {
toSerialize["blob"] = o.Blob
}
if !IsNil(o.BlobSize) {
toSerialize["blob_size"] = o.BlobSize
}
if !IsNil(o.Extra) {
toSerialize["extra"] = o.Extra
}
if !IsNil(o.Fee) {
toSerialize["fee"] = o.Fee
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Ins) {
toSerialize["ins"] = o.Ins
}
if !IsNil(o.KeeperBlock) {
toSerialize["keeper_block"] = o.KeeperBlock
}
if !IsNil(o.ObjectInJson) {
toSerialize["object_in_json"] = o.ObjectInJson
}
if !IsNil(o.Outs) {
toSerialize["outs"] = o.Outs
}
if !IsNil(o.PubKey) {
toSerialize["pub_key"] = o.PubKey
}
if !IsNil(o.Timestamp) {
toSerialize["timestamp"] = o.Timestamp
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TransactionDetailsModel) UnmarshalJSON(data []byte) (err error) {
varTransactionDetailsModel := _TransactionDetailsModel{}
err = json.Unmarshal(data, &varTransactionDetailsModel)
if err != nil {
return err
}
*o = TransactionDetailsModel(varTransactionDetailsModel)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "amount")
delete(additionalProperties, "attachments")
delete(additionalProperties, "blob")
delete(additionalProperties, "blob_size")
delete(additionalProperties, "extra")
delete(additionalProperties, "fee")
delete(additionalProperties, "id")
delete(additionalProperties, "ins")
delete(additionalProperties, "keeper_block")
delete(additionalProperties, "object_in_json")
delete(additionalProperties, "outs")
delete(additionalProperties, "pub_key")
delete(additionalProperties, "timestamp")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTransactionDetailsModel struct {
value *TransactionDetailsModel
isSet bool
}
func (v NullableTransactionDetailsModel) Get() *TransactionDetailsModel {
return v.value
}
func (v *NullableTransactionDetailsModel) Set(val *TransactionDetailsModel) {
v.value = val
v.isSet = true
}
func (v NullableTransactionDetailsModel) IsSet() bool {
return v.isSet
}
func (v *NullableTransactionDetailsModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTransactionDetailsModel(val *TransactionDetailsModel) *NullableTransactionDetailsModel {
return &NullableTransactionDetailsModel{value: val, isSet: true}
}
func (v NullableTransactionDetailsModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTransactionDetailsModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}