/*
 * 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"
	"time"
)

// EndpointDisabledEventData Sent when an endpoint has been automatically disabled after continuous failures.
type EndpointDisabledEventData struct {
	// The app's ID
	AppId string `json:"appId"`
	// The app's UID
	AppUid NullableString `json:"appUid,omitempty"`
	// The ep's ID
	EndpointId string `json:"endpointId"`
	// The ep's UID
	EndpointUid NullableString `json:"endpointUid,omitempty"`
	FailSince time.Time `json:"failSince"`
}

// NewEndpointDisabledEventData instantiates a new EndpointDisabledEventData 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 NewEndpointDisabledEventData(appId string, endpointId string, failSince time.Time) *EndpointDisabledEventData {
	this := EndpointDisabledEventData{}
	this.AppId = appId
	this.EndpointId = endpointId
	this.FailSince = failSince
	return &this
}

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

// GetAppId returns the AppId field value
func (o *EndpointDisabledEventData) GetAppId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.AppId
}

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

// SetAppId sets field value
func (o *EndpointDisabledEventData) SetAppId(v string) {
	o.AppId = v
}

// GetAppUid returns the AppUid field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EndpointDisabledEventData) GetAppUid() string {
	if o == nil || o.AppUid.Get() == nil {
		var ret string
		return ret
	}
	return *o.AppUid.Get()
}

// GetAppUidOk returns a tuple with the AppUid field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EndpointDisabledEventData) GetAppUidOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return o.AppUid.Get(), o.AppUid.IsSet()
}

// HasAppUid returns a boolean if a field has been set.
func (o *EndpointDisabledEventData) HasAppUid() bool {
	if o != nil && o.AppUid.IsSet() {
		return true
	}

	return false
}

// SetAppUid gets a reference to the given NullableString and assigns it to the AppUid field.
func (o *EndpointDisabledEventData) SetAppUid(v string) {
	o.AppUid.Set(&v)
}
// SetAppUidNil sets the value for AppUid to be an explicit nil
func (o *EndpointDisabledEventData) SetAppUidNil() {
	o.AppUid.Set(nil)
}

// UnsetAppUid ensures that no value is present for AppUid, not even an explicit nil
func (o *EndpointDisabledEventData) UnsetAppUid() {
	o.AppUid.Unset()
}

// GetEndpointId returns the EndpointId field value
func (o *EndpointDisabledEventData) GetEndpointId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.EndpointId
}

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

// SetEndpointId sets field value
func (o *EndpointDisabledEventData) SetEndpointId(v string) {
	o.EndpointId = v
}

// GetEndpointUid returns the EndpointUid field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *EndpointDisabledEventData) GetEndpointUid() string {
	if o == nil || o.EndpointUid.Get() == nil {
		var ret string
		return ret
	}
	return *o.EndpointUid.Get()
}

// GetEndpointUidOk returns a tuple with the EndpointUid field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *EndpointDisabledEventData) GetEndpointUidOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return o.EndpointUid.Get(), o.EndpointUid.IsSet()
}

// HasEndpointUid returns a boolean if a field has been set.
func (o *EndpointDisabledEventData) HasEndpointUid() bool {
	if o != nil && o.EndpointUid.IsSet() {
		return true
	}

	return false
}

// SetEndpointUid gets a reference to the given NullableString and assigns it to the EndpointUid field.
func (o *EndpointDisabledEventData) SetEndpointUid(v string) {
	o.EndpointUid.Set(&v)
}
// SetEndpointUidNil sets the value for EndpointUid to be an explicit nil
func (o *EndpointDisabledEventData) SetEndpointUidNil() {
	o.EndpointUid.Set(nil)
}

// UnsetEndpointUid ensures that no value is present for EndpointUid, not even an explicit nil
func (o *EndpointDisabledEventData) UnsetEndpointUid() {
	o.EndpointUid.Unset()
}

// GetFailSince returns the FailSince field value
func (o *EndpointDisabledEventData) GetFailSince() time.Time {
	if o == nil {
		var ret time.Time
		return ret
	}

	return o.FailSince
}

// GetFailSinceOk returns a tuple with the FailSince field value
// and a boolean to check if the value has been set.
func (o *EndpointDisabledEventData) GetFailSinceOk() (*time.Time, bool) {
	if o == nil  {
		return nil, false
	}
	return &o.FailSince, true
}

// SetFailSince sets field value
func (o *EndpointDisabledEventData) SetFailSince(v time.Time) {
	o.FailSince = v
}

func (o EndpointDisabledEventData) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["appId"] = o.AppId
	}
	if o.AppUid.IsSet() {
		toSerialize["appUid"] = o.AppUid.Get()
	}
	if true {
		toSerialize["endpointId"] = o.EndpointId
	}
	if o.EndpointUid.IsSet() {
		toSerialize["endpointUid"] = o.EndpointUid.Get()
	}
	if true {
		toSerialize["failSince"] = o.FailSince
	}
	return json.Marshal(toSerialize)
}

type NullableEndpointDisabledEventData struct {
	value *EndpointDisabledEventData
	isSet bool
}

func (v NullableEndpointDisabledEventData) Get() *EndpointDisabledEventData {
	return v.value
}

func (v *NullableEndpointDisabledEventData) Set(val *EndpointDisabledEventData) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableEndpointDisabledEventData(val *EndpointDisabledEventData) *NullableEndpointDisabledEventData {
	return &NullableEndpointDisabledEventData{value: val, isSet: true}
}

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

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


