/* 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"` AdditionalProperties map[string]interface{} } type _TransactionExtraModel TransactionExtraModel // 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 } for key, value := range o.AdditionalProperties { toSerialize[key] = value } return toSerialize, nil } func (o *TransactionExtraModel) UnmarshalJSON(data []byte) (err error) { varTransactionExtraModel := _TransactionExtraModel{} err = json.Unmarshal(data, &varTransactionExtraModel) if err != nil { return err } *o = TransactionExtraModel(varTransactionExtraModel) additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "type") delete(additionalProperties, "short_view") delete(additionalProperties, "details_view") o.AdditionalProperties = additionalProperties } return err } 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) }