/* 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 SubmitBlockRequestModel type satisfies the MappedNullable interface at compile time var _ MappedNullable = &SubmitBlockRequestModel{} // SubmitBlockRequestModel struct for SubmitBlockRequestModel type SubmitBlockRequestModel struct { BlockBlob *string `json:"block_blob,omitempty"` AdditionalProperties map[string]interface{} } type _SubmitBlockRequestModel SubmitBlockRequestModel // NewSubmitBlockRequestModel instantiates a new SubmitBlockRequestModel 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 NewSubmitBlockRequestModel() *SubmitBlockRequestModel { this := SubmitBlockRequestModel{} return &this } // NewSubmitBlockRequestModelWithDefaults instantiates a new SubmitBlockRequestModel 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 NewSubmitBlockRequestModelWithDefaults() *SubmitBlockRequestModel { this := SubmitBlockRequestModel{} return &this } // GetBlockBlob returns the BlockBlob field value if set, zero value otherwise. func (o *SubmitBlockRequestModel) GetBlockBlob() string { if o == nil || IsNil(o.BlockBlob) { var ret string return ret } return *o.BlockBlob } // GetBlockBlobOk returns a tuple with the BlockBlob field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *SubmitBlockRequestModel) GetBlockBlobOk() (*string, bool) { if o == nil || IsNil(o.BlockBlob) { return nil, false } return o.BlockBlob, true } // HasBlockBlob returns a boolean if a field has been set. func (o *SubmitBlockRequestModel) HasBlockBlob() bool { if o != nil && !IsNil(o.BlockBlob) { return true } return false } // SetBlockBlob gets a reference to the given string and assigns it to the BlockBlob field. func (o *SubmitBlockRequestModel) SetBlockBlob(v string) { o.BlockBlob = &v } func (o SubmitBlockRequestModel) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o SubmitBlockRequestModel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.BlockBlob) { toSerialize["block_blob"] = o.BlockBlob } for key, value := range o.AdditionalProperties { toSerialize[key] = value } return toSerialize, nil } func (o *SubmitBlockRequestModel) UnmarshalJSON(data []byte) (err error) { varSubmitBlockRequestModel := _SubmitBlockRequestModel{} err = json.Unmarshal(data, &varSubmitBlockRequestModel) if err != nil { return err } *o = SubmitBlockRequestModel(varSubmitBlockRequestModel) additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "block_blob") o.AdditionalProperties = additionalProperties } return err } type NullableSubmitBlockRequestModel struct { value *SubmitBlockRequestModel isSet bool } func (v NullableSubmitBlockRequestModel) Get() *SubmitBlockRequestModel { return v.value } func (v *NullableSubmitBlockRequestModel) Set(val *SubmitBlockRequestModel) { v.value = val v.isSet = true } func (v NullableSubmitBlockRequestModel) IsSet() bool { return v.isSet } func (v *NullableSubmitBlockRequestModel) Unset() { v.value = nil v.isSet = false } func NewNullableSubmitBlockRequestModel(val *SubmitBlockRequestModel) *NullableSubmitBlockRequestModel { return &NullableSubmitBlockRequestModel{value: val, isSet: true} } func (v NullableSubmitBlockRequestModel) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableSubmitBlockRequestModel) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }