forked from lthn/blockchain
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.
126 lines
3.3 KiB
Go
Generated
126 lines
3.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 SubmitBlockResponseModel type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SubmitBlockResponseModel{}
|
|
|
|
// SubmitBlockResponseModel struct for SubmitBlockResponseModel
|
|
type SubmitBlockResponseModel struct {
|
|
Status *string `json:"status,omitempty"`
|
|
}
|
|
|
|
// 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
|
|
}
|
|
return toSerialize, nil
|
|
}
|
|
|
|
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)
|
|
}
|
|
|
|
|