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

// ImportSource struct for ImportSource
type ImportSource struct {
	Type string `json:"type"`
	Target map[string]interface{} `json:"target"`
}

// NewImportSource instantiates a new ImportSource 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 NewImportSource(type_ string, target map[string]interface{}) *ImportSource {
	this := ImportSource{}
	this.Type = type_
	this.Target = target
	return &this
}

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

// GetType returns the Type field value
func (o *ImportSource) GetType() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Type
}

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

// SetType sets field value
func (o *ImportSource) SetType(v string) {
	o.Type = v
}

// GetTarget returns the Target field value
func (o *ImportSource) GetTarget() map[string]interface{} {
	if o == nil {
		var ret map[string]interface{}
		return ret
	}

	return o.Target
}

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

// SetTarget sets field value
func (o *ImportSource) SetTarget(v map[string]interface{}) {
	o.Target = v
}

func (o ImportSource) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["type"] = o.Type
	}
	if true {
		toSerialize["target"] = o.Target
	}
	return json.Marshal(toSerialize)
}

type NullableImportSource struct {
	value *ImportSource
	isSet bool
}

func (v NullableImportSource) Get() *ImportSource {
	return v.value
}

func (v *NullableImportSource) Set(val *ImportSource) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableImportSource(val *ImportSource) *NullableImportSource {
	return &NullableImportSource{value: val, isSet: true}
}

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

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


