/*
Mender API

Combined API specification for the features of the different Mender backend services, suitable for code generation applications 

API version: 1
Contact: support@mender.io
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package client

import (
	"encoding/json"
)

// checks if the ReleaseUpdate type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ReleaseUpdate{}

// ReleaseUpdate Fields to be updated in the given Release.
type ReleaseUpdate struct {
	// Release notes, limited to maximum length.
	Notes *string `json:"notes,omitempty"`
}

// NewReleaseUpdate instantiates a new ReleaseUpdate 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 NewReleaseUpdate() *ReleaseUpdate {
	this := ReleaseUpdate{}
	return &this
}

// NewReleaseUpdateWithDefaults instantiates a new ReleaseUpdate 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 NewReleaseUpdateWithDefaults() *ReleaseUpdate {
	this := ReleaseUpdate{}
	return &this
}

// GetNotes returns the Notes field value if set, zero value otherwise.
func (o *ReleaseUpdate) GetNotes() string {
	if o == nil || IsNil(o.Notes) {
		var ret string
		return ret
	}
	return *o.Notes
}

// GetNotesOk returns a tuple with the Notes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ReleaseUpdate) GetNotesOk() (*string, bool) {
	if o == nil || IsNil(o.Notes) {
		return nil, false
	}
	return o.Notes, true
}

// HasNotes returns a boolean if a field has been set.
func (o *ReleaseUpdate) HasNotes() bool {
	if o != nil && !IsNil(o.Notes) {
		return true
	}

	return false
}

// SetNotes gets a reference to the given string and assigns it to the Notes field.
func (o *ReleaseUpdate) SetNotes(v string) {
	o.Notes = &v
}

func (o ReleaseUpdate) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o ReleaseUpdate) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Notes) {
		toSerialize["notes"] = o.Notes
	}
	return toSerialize, nil
}

type NullableReleaseUpdate struct {
	value *ReleaseUpdate
	isSet bool
}

func (v NullableReleaseUpdate) Get() *ReleaseUpdate {
	return v.value
}

func (v *NullableReleaseUpdate) Set(val *ReleaseUpdate) {
	v.value = val
	v.isSet = true
}

func (v NullableReleaseUpdate) IsSet() bool {
	return v.isSet
}

func (v *NullableReleaseUpdate) Unset() {
	v.value = nil
	v.isSet = false
}

func NewNullableReleaseUpdate(val *ReleaseUpdate) *NullableReleaseUpdate {
	return &NullableReleaseUpdate{value: val, isSet: true}
}

func (v NullableReleaseUpdate) MarshalJSON() ([]byte, error) {
	return json.Marshal(v.value)
}

func (v *NullableReleaseUpdate) UnmarshalJSON(src []byte) error {
	v.isSet = true
	return json.Unmarshal(src, &v.value)
}


