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

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