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

198 lines
5.2 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 TransactionExtraModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TransactionExtraModel{}
// TransactionExtraModel struct for TransactionExtraModel
type TransactionExtraModel struct {
Type *string `json:"type,omitempty"`
ShortView *string `json:"short_view,omitempty"`
DetailsView *string `json:"details_view,omitempty"`
}
// NewTransactionExtraModel instantiates a new TransactionExtraModel 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 NewTransactionExtraModel() *TransactionExtraModel {
this := TransactionExtraModel{}
return &this
}
// NewTransactionExtraModelWithDefaults instantiates a new TransactionExtraModel 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 NewTransactionExtraModelWithDefaults() *TransactionExtraModel {
this := TransactionExtraModel{}
return &this
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *TransactionExtraModel) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionExtraModel) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *TransactionExtraModel) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *TransactionExtraModel) SetType(v string) {
o.Type = &v
}
// GetShortView returns the ShortView field value if set, zero value otherwise.
func (o *TransactionExtraModel) GetShortView() string {
if o == nil || IsNil(o.ShortView) {
var ret string
return ret
}
return *o.ShortView
}
// GetShortViewOk returns a tuple with the ShortView field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionExtraModel) GetShortViewOk() (*string, bool) {
if o == nil || IsNil(o.ShortView) {
return nil, false
}
return o.ShortView, true
}
// HasShortView returns a boolean if a field has been set.
func (o *TransactionExtraModel) HasShortView() bool {
if o != nil && !IsNil(o.ShortView) {
return true
}
return false
}
// SetShortView gets a reference to the given string and assigns it to the ShortView field.
func (o *TransactionExtraModel) SetShortView(v string) {
o.ShortView = &v
}
// GetDetailsView returns the DetailsView field value if set, zero value otherwise.
func (o *TransactionExtraModel) GetDetailsView() string {
if o == nil || IsNil(o.DetailsView) {
var ret string
return ret
}
return *o.DetailsView
}
// GetDetailsViewOk returns a tuple with the DetailsView field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TransactionExtraModel) GetDetailsViewOk() (*string, bool) {
if o == nil || IsNil(o.DetailsView) {
return nil, false
}
return o.DetailsView, true
}
// HasDetailsView returns a boolean if a field has been set.
func (o *TransactionExtraModel) HasDetailsView() bool {
if o != nil && !IsNil(o.DetailsView) {
return true
}
return false
}
// SetDetailsView gets a reference to the given string and assigns it to the DetailsView field.
func (o *TransactionExtraModel) SetDetailsView(v string) {
o.DetailsView = &v
}
func (o TransactionExtraModel) MarshalJSON() ([]byte, error) {
toSerialize,err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TransactionExtraModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.ShortView) {
toSerialize["short_view"] = o.ShortView
}
if !IsNil(o.DetailsView) {
toSerialize["details_view"] = o.DetailsView
}
return toSerialize, nil
}
type NullableTransactionExtraModel struct {
value *TransactionExtraModel
isSet bool
}
func (v NullableTransactionExtraModel) Get() *TransactionExtraModel {
return v.value
}
func (v *NullableTransactionExtraModel) Set(val *TransactionExtraModel) {
v.value = val
v.isSet = true
}
func (v NullableTransactionExtraModel) IsSet() bool {
return v.isSet
}
func (v *NullableTransactionExtraModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTransactionExtraModel(val *TransactionExtraModel) *NullableTransactionExtraModel {
return &NullableTransactionExtraModel{value: val, isSet: true}
}
func (v NullableTransactionExtraModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTransactionExtraModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}