/*
Edge Node API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 1.0.0
*/

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

package edgenode

import (
	"encoding/json"
)

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

// NodeGroup struct for NodeGroup
type NodeGroup struct {
	Id int64 `json:"id"`
	Name string `json:"name"`
}

// NewNodeGroup instantiates a new NodeGroup 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 NewNodeGroup(id int64, name string) *NodeGroup {
	this := NodeGroup{}
	this.Id = id
	this.Name = name
	return &this
}

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

// GetId returns the Id field value
func (o *NodeGroup) GetId() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.Id
}

// GetIdOk returns a tuple with the Id field value
// and a boolean to check if the value has been set.
func (o *NodeGroup) GetIdOk() (*int64, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Id, true
}

// SetId sets field value
func (o *NodeGroup) SetId(v int64) {
	o.Id = v
}

// GetName returns the Name field value
func (o *NodeGroup) GetName() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Name
}

// GetNameOk returns a tuple with the Name field value
// and a boolean to check if the value has been set.
func (o *NodeGroup) GetNameOk() (*string, bool) {
	if o == nil {
		return nil, false
	}
	return &o.Name, true
}

// SetName sets field value
func (o *NodeGroup) SetName(v string) {
	o.Name = v
}

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

func (o NodeGroup) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["id"] = o.Id
	toSerialize["name"] = o.Name
	return toSerialize, nil
}

type NullableNodeGroup struct {
	value *NodeGroup
	isSet bool
}

func (v NullableNodeGroup) Get() *NodeGroup {
	return v.value
}

func (v *NullableNodeGroup) Set(val *NodeGroup) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableNodeGroup(val *NodeGroup) *NullableNodeGroup {
	return &NullableNodeGroup{value: val, isSet: true}
}

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

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


