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

// MalwareScan A single scan from a scanner
type MalwareScan struct {
	// Indicates if the scanner is enabled
	Enabled *bool `json:"enabled,omitempty"`
	// The name of the scanner that produced the finding
	Scanner *string `json:"scanner,omitempty"`
	// Open schema for scanner-specific metadata related to the scan result
	Metadata map[string]interface{} `json:"metadata,omitempty"`
	Findings []MalwareScanFindingsInner `json:"findings,omitempty"`
}

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

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

// GetEnabled returns the Enabled field value if set, zero value otherwise.
func (o *MalwareScan) GetEnabled() bool {
	if o == nil || o.Enabled == nil {
		var ret bool
		return ret
	}
	return *o.Enabled
}

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

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

	return false
}

// SetEnabled gets a reference to the given bool and assigns it to the Enabled field.
func (o *MalwareScan) SetEnabled(v bool) {
	o.Enabled = &v
}

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

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

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

	return false
}

// SetScanner gets a reference to the given string and assigns it to the Scanner field.
func (o *MalwareScan) SetScanner(v string) {
	o.Scanner = &v
}

// GetMetadata returns the Metadata field value if set, zero value otherwise.
func (o *MalwareScan) GetMetadata() map[string]interface{} {
	if o == nil || o.Metadata == nil {
		var ret map[string]interface{}
		return ret
	}
	return o.Metadata
}

// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MalwareScan) GetMetadataOk() (map[string]interface{}, bool) {
	if o == nil || o.Metadata == nil {
		return nil, false
	}
	return o.Metadata, true
}

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

	return false
}

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

// GetFindings returns the Findings field value if set, zero value otherwise.
func (o *MalwareScan) GetFindings() []MalwareScanFindingsInner {
	if o == nil || o.Findings == nil {
		var ret []MalwareScanFindingsInner
		return ret
	}
	return o.Findings
}

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

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

	return false
}

// SetFindings gets a reference to the given []MalwareScanFindingsInner and assigns it to the Findings field.
func (o *MalwareScan) SetFindings(v []MalwareScanFindingsInner) {
	o.Findings = v
}

func (o MalwareScan) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Enabled != nil {
		toSerialize["enabled"] = o.Enabled
	}
	if o.Scanner != nil {
		toSerialize["scanner"] = o.Scanner
	}
	if o.Metadata != nil {
		toSerialize["metadata"] = o.Metadata
	}
	if o.Findings != nil {
		toSerialize["findings"] = o.Findings
	}
	return json.Marshal(toSerialize)
}

type NullableMalwareScan struct {
	value *MalwareScan
	isSet bool
}

func (v NullableMalwareScan) Get() *MalwareScan {
	return v.value
}

func (v *NullableMalwareScan) Set(val *MalwareScan) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableMalwareScan(val *MalwareScan) *NullableMalwareScan {
	return &NullableMalwareScan{value: val, isSet: true}
}

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

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


