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.
303 lines
7.3 KiB
Go
Generated
303 lines
7.3 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 VersionModel type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &VersionModel{}
|
|
|
|
// VersionModel struct for VersionModel
|
|
type VersionModel struct {
|
|
Version *string `json:"version,omitempty"`
|
|
VersionLong *string `json:"version_long,omitempty"`
|
|
Major *string `json:"major,omitempty"`
|
|
Minor *string `json:"minor,omitempty"`
|
|
Revision *string `json:"revision,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _VersionModel VersionModel
|
|
|
|
// NewVersionModel instantiates a new VersionModel 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 NewVersionModel() *VersionModel {
|
|
this := VersionModel{}
|
|
return &this
|
|
}
|
|
|
|
// NewVersionModelWithDefaults instantiates a new VersionModel 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 NewVersionModelWithDefaults() *VersionModel {
|
|
this := VersionModel{}
|
|
return &this
|
|
}
|
|
|
|
// GetVersion returns the Version field value if set, zero value otherwise.
|
|
func (o *VersionModel) GetVersion() string {
|
|
if o == nil || IsNil(o.Version) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Version
|
|
}
|
|
|
|
// GetVersionOk returns a tuple with the Version field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VersionModel) GetVersionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Version) {
|
|
return nil, false
|
|
}
|
|
return o.Version, true
|
|
}
|
|
|
|
// HasVersion returns a boolean if a field has been set.
|
|
func (o *VersionModel) HasVersion() bool {
|
|
if o != nil && !IsNil(o.Version) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersion gets a reference to the given string and assigns it to the Version field.
|
|
func (o *VersionModel) SetVersion(v string) {
|
|
o.Version = &v
|
|
}
|
|
|
|
// GetVersionLong returns the VersionLong field value if set, zero value otherwise.
|
|
func (o *VersionModel) GetVersionLong() string {
|
|
if o == nil || IsNil(o.VersionLong) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.VersionLong
|
|
}
|
|
|
|
// GetVersionLongOk returns a tuple with the VersionLong field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VersionModel) GetVersionLongOk() (*string, bool) {
|
|
if o == nil || IsNil(o.VersionLong) {
|
|
return nil, false
|
|
}
|
|
return o.VersionLong, true
|
|
}
|
|
|
|
// HasVersionLong returns a boolean if a field has been set.
|
|
func (o *VersionModel) HasVersionLong() bool {
|
|
if o != nil && !IsNil(o.VersionLong) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVersionLong gets a reference to the given string and assigns it to the VersionLong field.
|
|
func (o *VersionModel) SetVersionLong(v string) {
|
|
o.VersionLong = &v
|
|
}
|
|
|
|
// GetMajor returns the Major field value if set, zero value otherwise.
|
|
func (o *VersionModel) GetMajor() string {
|
|
if o == nil || IsNil(o.Major) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Major
|
|
}
|
|
|
|
// GetMajorOk returns a tuple with the Major field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VersionModel) GetMajorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Major) {
|
|
return nil, false
|
|
}
|
|
return o.Major, true
|
|
}
|
|
|
|
// HasMajor returns a boolean if a field has been set.
|
|
func (o *VersionModel) HasMajor() bool {
|
|
if o != nil && !IsNil(o.Major) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMajor gets a reference to the given string and assigns it to the Major field.
|
|
func (o *VersionModel) SetMajor(v string) {
|
|
o.Major = &v
|
|
}
|
|
|
|
// GetMinor returns the Minor field value if set, zero value otherwise.
|
|
func (o *VersionModel) GetMinor() string {
|
|
if o == nil || IsNil(o.Minor) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Minor
|
|
}
|
|
|
|
// GetMinorOk returns a tuple with the Minor field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VersionModel) GetMinorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Minor) {
|
|
return nil, false
|
|
}
|
|
return o.Minor, true
|
|
}
|
|
|
|
// HasMinor returns a boolean if a field has been set.
|
|
func (o *VersionModel) HasMinor() bool {
|
|
if o != nil && !IsNil(o.Minor) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMinor gets a reference to the given string and assigns it to the Minor field.
|
|
func (o *VersionModel) SetMinor(v string) {
|
|
o.Minor = &v
|
|
}
|
|
|
|
// GetRevision returns the Revision field value if set, zero value otherwise.
|
|
func (o *VersionModel) GetRevision() string {
|
|
if o == nil || IsNil(o.Revision) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Revision
|
|
}
|
|
|
|
// GetRevisionOk returns a tuple with the Revision field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *VersionModel) GetRevisionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Revision) {
|
|
return nil, false
|
|
}
|
|
return o.Revision, true
|
|
}
|
|
|
|
// HasRevision returns a boolean if a field has been set.
|
|
func (o *VersionModel) HasRevision() bool {
|
|
if o != nil && !IsNil(o.Revision) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRevision gets a reference to the given string and assigns it to the Revision field.
|
|
func (o *VersionModel) SetRevision(v string) {
|
|
o.Revision = &v
|
|
}
|
|
|
|
func (o VersionModel) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o VersionModel) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Version) {
|
|
toSerialize["version"] = o.Version
|
|
}
|
|
if !IsNil(o.VersionLong) {
|
|
toSerialize["version_long"] = o.VersionLong
|
|
}
|
|
if !IsNil(o.Major) {
|
|
toSerialize["major"] = o.Major
|
|
}
|
|
if !IsNil(o.Minor) {
|
|
toSerialize["minor"] = o.Minor
|
|
}
|
|
if !IsNil(o.Revision) {
|
|
toSerialize["revision"] = o.Revision
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *VersionModel) UnmarshalJSON(data []byte) (err error) {
|
|
varVersionModel := _VersionModel{}
|
|
|
|
err = json.Unmarshal(data, &varVersionModel)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = VersionModel(varVersionModel)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "version")
|
|
delete(additionalProperties, "version_long")
|
|
delete(additionalProperties, "major")
|
|
delete(additionalProperties, "minor")
|
|
delete(additionalProperties, "revision")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableVersionModel struct {
|
|
value *VersionModel
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableVersionModel) Get() *VersionModel {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableVersionModel) Set(val *VersionModel) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableVersionModel) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableVersionModel) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableVersionModel(val *VersionModel) *NullableVersionModel {
|
|
return &NullableVersionModel{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableVersionModel) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableVersionModel) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|