/*
Anchore Engine API Server

This is the Anchore Engine API. Provides the primary external API for users of the service.

API version: 0.1.20
Contact: nurmi@anchore.com
*/

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

package anchore

import (
	"encoding/json"
)

// EventResponseEventResource struct for EventResponseEventResource
type EventResponseEventResource struct {
	UserId *string `json:"user_id,omitempty"`
	Id *string `json:"id,omitempty"`
	Type *string `json:"type,omitempty"`
}

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

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

// GetUserId returns the UserId field value if set, zero value otherwise.
func (o *EventResponseEventResource) GetUserId() string {
	if o == nil || o.UserId == nil {
		var ret string
		return ret
	}
	return *o.UserId
}

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

// HasUserId returns a boolean if a field has been set.
func (o *EventResponseEventResource) HasUserId() bool {
	if o != nil && o.UserId != nil {
		return true
	}

	return false
}

// SetUserId gets a reference to the given string and assigns it to the UserId field.
func (o *EventResponseEventResource) SetUserId(v string) {
	o.UserId = &v
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *EventResponseEventResource) GetId() string {
	if o == nil || o.Id == nil {
		var ret string
		return ret
	}
	return *o.Id
}

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

// HasId returns a boolean if a field has been set.
func (o *EventResponseEventResource) HasId() bool {
	if o != nil && o.Id != nil {
		return true
	}

	return false
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *EventResponseEventResource) SetId(v string) {
	o.Id = &v
}

// GetType returns the Type field value if set, zero value otherwise.
func (o *EventResponseEventResource) GetType() string {
	if o == nil || o.Type == nil {
		var ret string
		return ret
	}
	return *o.Type
}

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

// HasType returns a boolean if a field has been set.
func (o *EventResponseEventResource) HasType() bool {
	if o != nil && o.Type != nil {
		return true
	}

	return false
}

// SetType gets a reference to the given string and assigns it to the Type field.
func (o *EventResponseEventResource) SetType(v string) {
	o.Type = &v
}

func (o EventResponseEventResource) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.UserId != nil {
		toSerialize["user_id"] = o.UserId
	}
	if o.Id != nil {
		toSerialize["id"] = o.Id
	}
	if o.Type != nil {
		toSerialize["type"] = o.Type
	}
	return json.Marshal(toSerialize)
}

type NullableEventResponseEventResource struct {
	value *EventResponseEventResource
	isSet bool
}

func (v NullableEventResponseEventResource) Get() *EventResponseEventResource {
	return v.value
}

func (v *NullableEventResponseEventResource) Set(val *EventResponseEventResource) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableEventResponseEventResource(val *EventResponseEventResource) *NullableEventResponseEventResource {
	return &NullableEventResponseEventResource{value: val, isSet: true}
}

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

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


