/* 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 MaintainersInfoModel type satisfies the MappedNullable interface at compile time var _ MappedNullable = &MaintainersInfoModel{} // MaintainersInfoModel struct for MaintainersInfoModel type MaintainersInfoModel struct { VerMajor *int32 `json:"ver_major,omitempty"` VerMinor *int32 `json:"ver_minor,omitempty"` VerRevision *int32 `json:"ver_revision,omitempty"` BuildNo *int32 `json:"build_no,omitempty"` Mode *int32 `json:"mode,omitempty"` AdditionalProperties map[string]interface{} } type _MaintainersInfoModel MaintainersInfoModel // NewMaintainersInfoModel instantiates a new MaintainersInfoModel 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 NewMaintainersInfoModel() *MaintainersInfoModel { this := MaintainersInfoModel{} return &this } // NewMaintainersInfoModelWithDefaults instantiates a new MaintainersInfoModel 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 NewMaintainersInfoModelWithDefaults() *MaintainersInfoModel { this := MaintainersInfoModel{} return &this } // GetVerMajor returns the VerMajor field value if set, zero value otherwise. func (o *MaintainersInfoModel) GetVerMajor() int32 { if o == nil || IsNil(o.VerMajor) { var ret int32 return ret } return *o.VerMajor } // GetVerMajorOk returns a tuple with the VerMajor field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MaintainersInfoModel) GetVerMajorOk() (*int32, bool) { if o == nil || IsNil(o.VerMajor) { return nil, false } return o.VerMajor, true } // HasVerMajor returns a boolean if a field has been set. func (o *MaintainersInfoModel) HasVerMajor() bool { if o != nil && !IsNil(o.VerMajor) { return true } return false } // SetVerMajor gets a reference to the given int32 and assigns it to the VerMajor field. func (o *MaintainersInfoModel) SetVerMajor(v int32) { o.VerMajor = &v } // GetVerMinor returns the VerMinor field value if set, zero value otherwise. func (o *MaintainersInfoModel) GetVerMinor() int32 { if o == nil || IsNil(o.VerMinor) { var ret int32 return ret } return *o.VerMinor } // GetVerMinorOk returns a tuple with the VerMinor field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MaintainersInfoModel) GetVerMinorOk() (*int32, bool) { if o == nil || IsNil(o.VerMinor) { return nil, false } return o.VerMinor, true } // HasVerMinor returns a boolean if a field has been set. func (o *MaintainersInfoModel) HasVerMinor() bool { if o != nil && !IsNil(o.VerMinor) { return true } return false } // SetVerMinor gets a reference to the given int32 and assigns it to the VerMinor field. func (o *MaintainersInfoModel) SetVerMinor(v int32) { o.VerMinor = &v } // GetVerRevision returns the VerRevision field value if set, zero value otherwise. func (o *MaintainersInfoModel) GetVerRevision() int32 { if o == nil || IsNil(o.VerRevision) { var ret int32 return ret } return *o.VerRevision } // GetVerRevisionOk returns a tuple with the VerRevision field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MaintainersInfoModel) GetVerRevisionOk() (*int32, bool) { if o == nil || IsNil(o.VerRevision) { return nil, false } return o.VerRevision, true } // HasVerRevision returns a boolean if a field has been set. func (o *MaintainersInfoModel) HasVerRevision() bool { if o != nil && !IsNil(o.VerRevision) { return true } return false } // SetVerRevision gets a reference to the given int32 and assigns it to the VerRevision field. func (o *MaintainersInfoModel) SetVerRevision(v int32) { o.VerRevision = &v } // GetBuildNo returns the BuildNo field value if set, zero value otherwise. func (o *MaintainersInfoModel) GetBuildNo() int32 { if o == nil || IsNil(o.BuildNo) { var ret int32 return ret } return *o.BuildNo } // GetBuildNoOk returns a tuple with the BuildNo field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MaintainersInfoModel) GetBuildNoOk() (*int32, bool) { if o == nil || IsNil(o.BuildNo) { return nil, false } return o.BuildNo, true } // HasBuildNo returns a boolean if a field has been set. func (o *MaintainersInfoModel) HasBuildNo() bool { if o != nil && !IsNil(o.BuildNo) { return true } return false } // SetBuildNo gets a reference to the given int32 and assigns it to the BuildNo field. func (o *MaintainersInfoModel) SetBuildNo(v int32) { o.BuildNo = &v } // GetMode returns the Mode field value if set, zero value otherwise. func (o *MaintainersInfoModel) GetMode() int32 { if o == nil || IsNil(o.Mode) { var ret int32 return ret } return *o.Mode } // GetModeOk returns a tuple with the Mode field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *MaintainersInfoModel) GetModeOk() (*int32, bool) { if o == nil || IsNil(o.Mode) { return nil, false } return o.Mode, true } // HasMode returns a boolean if a field has been set. func (o *MaintainersInfoModel) HasMode() bool { if o != nil && !IsNil(o.Mode) { return true } return false } // SetMode gets a reference to the given int32 and assigns it to the Mode field. func (o *MaintainersInfoModel) SetMode(v int32) { o.Mode = &v } func (o MaintainersInfoModel) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { return []byte{}, err } return json.Marshal(toSerialize) } func (o MaintainersInfoModel) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} if !IsNil(o.VerMajor) { toSerialize["ver_major"] = o.VerMajor } if !IsNil(o.VerMinor) { toSerialize["ver_minor"] = o.VerMinor } if !IsNil(o.VerRevision) { toSerialize["ver_revision"] = o.VerRevision } if !IsNil(o.BuildNo) { toSerialize["build_no"] = o.BuildNo } if !IsNil(o.Mode) { toSerialize["mode"] = o.Mode } for key, value := range o.AdditionalProperties { toSerialize[key] = value } return toSerialize, nil } func (o *MaintainersInfoModel) UnmarshalJSON(data []byte) (err error) { varMaintainersInfoModel := _MaintainersInfoModel{} err = json.Unmarshal(data, &varMaintainersInfoModel) if err != nil { return err } *o = MaintainersInfoModel(varMaintainersInfoModel) additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "ver_major") delete(additionalProperties, "ver_minor") delete(additionalProperties, "ver_revision") delete(additionalProperties, "build_no") delete(additionalProperties, "mode") o.AdditionalProperties = additionalProperties } return err } type NullableMaintainersInfoModel struct { value *MaintainersInfoModel isSet bool } func (v NullableMaintainersInfoModel) Get() *MaintainersInfoModel { return v.value } func (v *NullableMaintainersInfoModel) Set(val *MaintainersInfoModel) { v.value = val v.isSet = true } func (v NullableMaintainersInfoModel) IsSet() bool { return v.isSet } func (v *NullableMaintainersInfoModel) Unset() { v.value = nil v.isSet = false } func NewNullableMaintainersInfoModel(val *MaintainersInfoModel) *NullableMaintainersInfoModel { return &NullableMaintainersInfoModel{value: val, isSet: true} } func (v NullableMaintainersInfoModel) MarshalJSON() ([]byte, error) { return json.Marshal(v.value) } func (v *NullableMaintainersInfoModel) UnmarshalJSON(src []byte) error { v.isSet = true return json.Unmarshal(src, &v.value) }