/*
Hindsight HTTP API

HTTP API for Hindsight

API version: 0.4.22
*/

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

package hindsight

import (
	"encoding/json"
	"bytes"
	"fmt"
)

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

// TagGroupNotOutput Compound NOT group: child filter must NOT match.
type TagGroupNotOutput struct {
	Not Not1 `json:"not"`
}

type _TagGroupNotOutput TagGroupNotOutput

// NewTagGroupNotOutput instantiates a new TagGroupNotOutput 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 NewTagGroupNotOutput(not Not1) *TagGroupNotOutput {
	this := TagGroupNotOutput{}
	this.Not = not
	return &this
}

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

// GetNot returns the Not field value
func (o *TagGroupNotOutput) GetNot() Not1 {
	if o == nil {
		var ret Not1
		return ret
	}

	return o.Not
}

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

// SetNot sets field value
func (o *TagGroupNotOutput) SetNot(v Not1) {
	o.Not = v
}

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

func (o TagGroupNotOutput) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	toSerialize["not"] = o.Not
	return toSerialize, nil
}

func (o *TagGroupNotOutput) UnmarshalJSON(data []byte) (err error) {
	// This validates that all required properties are included in the JSON object
	// by unmarshalling the object into a generic map with string keys and checking
	// that every required field exists as a key in the generic map.
	requiredProperties := []string{
		"not",
	}

	allProperties := make(map[string]interface{})

	err = json.Unmarshal(data, &allProperties)

	if err != nil {
		return err;
	}

	for _, requiredProperty := range(requiredProperties) {
		if _, exists := allProperties[requiredProperty]; !exists {
			return fmt.Errorf("no value given for required property %v", requiredProperty)
		}
	}

	varTagGroupNotOutput := _TagGroupNotOutput{}

	decoder := json.NewDecoder(bytes.NewReader(data))
	decoder.DisallowUnknownFields()
	err = decoder.Decode(&varTagGroupNotOutput)

	if err != nil {
		return err
	}

	*o = TagGroupNotOutput(varTagGroupNotOutput)

	return err
}

type NullableTagGroupNotOutput struct {
	value *TagGroupNotOutput
	isSet bool
}

func (v NullableTagGroupNotOutput) Get() *TagGroupNotOutput {
	return v.value
}

func (v *NullableTagGroupNotOutput) Set(val *TagGroupNotOutput) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableTagGroupNotOutput(val *TagGroupNotOutput) *NullableTagGroupNotOutput {
	return &NullableTagGroupNotOutput{value: val, isSet: true}
}

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

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


