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

// VulnerabilityResponse envelope containing list of vulnerabilities
type VulnerabilityResponse struct {
	ImageDigest *string `json:"imageDigest,omitempty"`
	VulnerabilityType *string `json:"vulnerability_type,omitempty"`
	// List of Vulnerability objects
	Vulnerabilities []Vulnerability `json:"vulnerabilities,omitempty"`
}

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

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

// GetImageDigest returns the ImageDigest field value if set, zero value otherwise.
func (o *VulnerabilityResponse) 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 *VulnerabilityResponse) 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 *VulnerabilityResponse) 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 *VulnerabilityResponse) SetImageDigest(v string) {
	o.ImageDigest = &v
}

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

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

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

	return false
}

// SetVulnerabilityType gets a reference to the given string and assigns it to the VulnerabilityType field.
func (o *VulnerabilityResponse) SetVulnerabilityType(v string) {
	o.VulnerabilityType = &v
}

// GetVulnerabilities returns the Vulnerabilities field value if set, zero value otherwise.
func (o *VulnerabilityResponse) GetVulnerabilities() []Vulnerability {
	if o == nil || o.Vulnerabilities == nil {
		var ret []Vulnerability
		return ret
	}
	return o.Vulnerabilities
}

// GetVulnerabilitiesOk returns a tuple with the Vulnerabilities field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *VulnerabilityResponse) GetVulnerabilitiesOk() ([]Vulnerability, bool) {
	if o == nil || o.Vulnerabilities == nil {
		return nil, false
	}
	return o.Vulnerabilities, true
}

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

	return false
}

// SetVulnerabilities gets a reference to the given []Vulnerability and assigns it to the Vulnerabilities field.
func (o *VulnerabilityResponse) SetVulnerabilities(v []Vulnerability) {
	o.Vulnerabilities = v
}

func (o VulnerabilityResponse) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.ImageDigest != nil {
		toSerialize["imageDigest"] = o.ImageDigest
	}
	if o.VulnerabilityType != nil {
		toSerialize["vulnerability_type"] = o.VulnerabilityType
	}
	if o.Vulnerabilities != nil {
		toSerialize["vulnerabilities"] = o.Vulnerabilities
	}
	return json.Marshal(toSerialize)
}

type NullableVulnerabilityResponse struct {
	value *VulnerabilityResponse
	isSet bool
}

func (v NullableVulnerabilityResponse) Get() *VulnerabilityResponse {
	return v.value
}

func (v *NullableVulnerabilityResponse) Set(val *VulnerabilityResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableVulnerabilityResponse(val *VulnerabilityResponse) *NullableVulnerabilityResponse {
	return &NullableVulnerabilityResponse{value: val, isSet: true}
}

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

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


