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

// VulnUpdateNotificationPayload struct for VulnUpdateNotificationPayload
type VulnUpdateNotificationPayload struct {
	UserId *string `json:"userId,omitempty"`
	SubscriptionKey *string `json:"subscription_key,omitempty"`
	SubscriptionType *string `json:"subscription_type,omitempty"`
	NotificationId *string `json:"notificationId,omitempty"`
	DiffVulnerabilityResult *VulnDiffResult `json:"diff_vulnerability_result,omitempty"`
	ImageDigest *string `json:"imageDigest,omitempty"`
	// List of Corresponding Image Annotations
	Annotations map[string]interface{} `json:"annotations,omitempty"`
}

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

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

// GetUserId returns the UserId field value if set, zero value otherwise.
func (o *VulnUpdateNotificationPayload) 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 *VulnUpdateNotificationPayload) 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 *VulnUpdateNotificationPayload) 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 *VulnUpdateNotificationPayload) SetUserId(v string) {
	o.UserId = &v
}

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

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

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

	return false
}

// SetSubscriptionKey gets a reference to the given string and assigns it to the SubscriptionKey field.
func (o *VulnUpdateNotificationPayload) SetSubscriptionKey(v string) {
	o.SubscriptionKey = &v
}

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

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

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

	return false
}

// SetSubscriptionType gets a reference to the given string and assigns it to the SubscriptionType field.
func (o *VulnUpdateNotificationPayload) SetSubscriptionType(v string) {
	o.SubscriptionType = &v
}

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

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

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

	return false
}

// SetNotificationId gets a reference to the given string and assigns it to the NotificationId field.
func (o *VulnUpdateNotificationPayload) SetNotificationId(v string) {
	o.NotificationId = &v
}

// GetDiffVulnerabilityResult returns the DiffVulnerabilityResult field value if set, zero value otherwise.
func (o *VulnUpdateNotificationPayload) GetDiffVulnerabilityResult() VulnDiffResult {
	if o == nil || o.DiffVulnerabilityResult == nil {
		var ret VulnDiffResult
		return ret
	}
	return *o.DiffVulnerabilityResult
}

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

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

	return false
}

// SetDiffVulnerabilityResult gets a reference to the given VulnDiffResult and assigns it to the DiffVulnerabilityResult field.
func (o *VulnUpdateNotificationPayload) SetDiffVulnerabilityResult(v VulnDiffResult) {
	o.DiffVulnerabilityResult = &v
}

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

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

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

	return false
}

// SetImageDigest gets a reference to the given string and assigns it to the ImageDigest field.
func (o *VulnUpdateNotificationPayload) SetImageDigest(v string) {
	o.ImageDigest = &v
}

// GetAnnotations returns the Annotations field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *VulnUpdateNotificationPayload) GetAnnotations() map[string]interface{} {
	if o == nil {
		var ret map[string]interface{}
		return ret
	}
	return o.Annotations
}

// GetAnnotationsOk returns a tuple with the Annotations 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 *VulnUpdateNotificationPayload) GetAnnotationsOk() (map[string]interface{}, bool) {
	if o == nil || o.Annotations == nil {
		return nil, false
	}
	return o.Annotations, true
}

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

	return false
}

// SetAnnotations gets a reference to the given map[string]interface{} and assigns it to the Annotations field.
func (o *VulnUpdateNotificationPayload) SetAnnotations(v map[string]interface{}) {
	o.Annotations = v
}

func (o VulnUpdateNotificationPayload) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.UserId != nil {
		toSerialize["userId"] = o.UserId
	}
	if o.SubscriptionKey != nil {
		toSerialize["subscription_key"] = o.SubscriptionKey
	}
	if o.SubscriptionType != nil {
		toSerialize["subscription_type"] = o.SubscriptionType
	}
	if o.NotificationId != nil {
		toSerialize["notificationId"] = o.NotificationId
	}
	if o.DiffVulnerabilityResult != nil {
		toSerialize["diff_vulnerability_result"] = o.DiffVulnerabilityResult
	}
	if o.ImageDigest != nil {
		toSerialize["imageDigest"] = o.ImageDigest
	}
	if o.Annotations != nil {
		toSerialize["annotations"] = o.Annotations
	}
	return json.Marshal(toSerialize)
}

type NullableVulnUpdateNotificationPayload struct {
	value *VulnUpdateNotificationPayload
	isSet bool
}

func (v NullableVulnUpdateNotificationPayload) Get() *VulnUpdateNotificationPayload {
	return v.value
}

func (v *NullableVulnUpdateNotificationPayload) Set(val *VulnUpdateNotificationPayload) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableVulnUpdateNotificationPayload(val *VulnUpdateNotificationPayload) *NullableVulnUpdateNotificationPayload {
	return &NullableVulnUpdateNotificationPayload{value: val, isSet: true}
}

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

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


