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.
155 lines
4 KiB
Go
Generated
155 lines
4 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 SubmitBlockResponseModel type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SubmitBlockResponseModel{}
|
|
|
|
// SubmitBlockResponseModel struct for SubmitBlockResponseModel
|
|
type SubmitBlockResponseModel struct {
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SubmitBlockResponseModel SubmitBlockResponseModel
|
|
|
|
// NewSubmitBlockResponseModel instantiates a new SubmitBlockResponseModel 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 NewSubmitBlockResponseModel() *SubmitBlockResponseModel {
|
|
this := SubmitBlockResponseModel{}
|
|
return &this
|
|
}
|
|
|
|
// NewSubmitBlockResponseModelWithDefaults instantiates a new SubmitBlockResponseModel 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 NewSubmitBlockResponseModelWithDefaults() *SubmitBlockResponseModel {
|
|
this := SubmitBlockResponseModel{}
|
|
return &this
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *SubmitBlockResponseModel) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SubmitBlockResponseModel) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *SubmitBlockResponseModel) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *SubmitBlockResponseModel) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o SubmitBlockResponseModel) MarshalJSON() ([]byte, error) {
|
|
toSerialize,err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SubmitBlockResponseModel) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SubmitBlockResponseModel) UnmarshalJSON(data []byte) (err error) {
|
|
varSubmitBlockResponseModel := _SubmitBlockResponseModel{}
|
|
|
|
err = json.Unmarshal(data, &varSubmitBlockResponseModel)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SubmitBlockResponseModel(varSubmitBlockResponseModel)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSubmitBlockResponseModel struct {
|
|
value *SubmitBlockResponseModel
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSubmitBlockResponseModel) Get() *SubmitBlockResponseModel {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSubmitBlockResponseModel) Set(val *SubmitBlockResponseModel) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSubmitBlockResponseModel) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSubmitBlockResponseModel) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSubmitBlockResponseModel(val *SubmitBlockResponseModel) *NullableSubmitBlockResponseModel {
|
|
return &NullableSubmitBlockResponseModel{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSubmitBlockResponseModel) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSubmitBlockResponseModel) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|
|
|
|
|