/*
 * Svix API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 1.1.1
 */

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

package openapi

import (
	"encoding/json"
)

// MessageAttemptExhaustedEvent Sent when a message delivery has failed (all of the retry attempts have been exhausted).
type MessageAttemptExhaustedEvent struct {
	Data MessageAttemptExhaustedEventData `json:"data"`
	Type string `json:"type"`
}

// NewMessageAttemptExhaustedEvent instantiates a new MessageAttemptExhaustedEvent 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 NewMessageAttemptExhaustedEvent(data MessageAttemptExhaustedEventData, type_ string) *MessageAttemptExhaustedEvent {
	this := MessageAttemptExhaustedEvent{}
	this.Data = data
	this.Type = type_
	return &this
}

// NewMessageAttemptExhaustedEventWithDefaults instantiates a new MessageAttemptExhaustedEvent 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 NewMessageAttemptExhaustedEventWithDefaults() *MessageAttemptExhaustedEvent {
	this := MessageAttemptExhaustedEvent{}
	var type_ string = "message.attempt.exhausted"
	this.Type = type_
	return &this
}

// GetData returns the Data field value
func (o *MessageAttemptExhaustedEvent) GetData() MessageAttemptExhaustedEventData {
	if o == nil {
		var ret MessageAttemptExhaustedEventData
		return ret
	}

	return o.Data
}

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

// SetData sets field value
func (o *MessageAttemptExhaustedEvent) SetData(v MessageAttemptExhaustedEventData) {
	o.Data = v
}

// GetType returns the Type field value
func (o *MessageAttemptExhaustedEvent) GetType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Type
}

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

// SetType sets field value
func (o *MessageAttemptExhaustedEvent) SetType(v string) {
	o.Type = v
}

func (o MessageAttemptExhaustedEvent) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["data"] = o.Data
	}
	if true {
		toSerialize["type"] = o.Type
	}
	return json.Marshal(toSerialize)
}

type NullableMessageAttemptExhaustedEvent struct {
	value *MessageAttemptExhaustedEvent
	isSet bool
}

func (v NullableMessageAttemptExhaustedEvent) Get() *MessageAttemptExhaustedEvent {
	return v.value
}

func (v *NullableMessageAttemptExhaustedEvent) Set(val *MessageAttemptExhaustedEvent) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMessageAttemptExhaustedEvent(val *MessageAttemptExhaustedEvent) *NullableMessageAttemptExhaustedEvent {
	return &NullableMessageAttemptExhaustedEvent{value: val, isSet: true}
}

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

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


