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

// ImportContentDigests Digest of content to use in the final import
type ImportContentDigests struct {
	// Digest to use for the packages content
	Packages string `json:"packages"`
	// Digest for reference content for image config
	ImageConfig string `json:"image_config"`
	// Digest to reference content for the image manifest
	Manifest string `json:"manifest"`
	// Digest for reference content for parent manifest
	ParentManifest *string `json:"parent_manifest,omitempty"`
	// Digest for reference content for dockerfile
	Dockerfile *string `json:"dockerfile,omitempty"`
}

// NewImportContentDigests instantiates a new ImportContentDigests 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 NewImportContentDigests(packages string, imageConfig string, manifest string) *ImportContentDigests {
	this := ImportContentDigests{}
	this.Packages = packages
	this.ImageConfig = imageConfig
	this.Manifest = manifest
	return &this
}

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

// GetPackages returns the Packages field value
func (o *ImportContentDigests) GetPackages() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Packages
}

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

// SetPackages sets field value
func (o *ImportContentDigests) SetPackages(v string) {
	o.Packages = v
}

// GetImageConfig returns the ImageConfig field value
func (o *ImportContentDigests) GetImageConfig() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.ImageConfig
}

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

// SetImageConfig sets field value
func (o *ImportContentDigests) SetImageConfig(v string) {
	o.ImageConfig = v
}

// GetManifest returns the Manifest field value
func (o *ImportContentDigests) GetManifest() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Manifest
}

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

// SetManifest sets field value
func (o *ImportContentDigests) SetManifest(v string) {
	o.Manifest = v
}

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

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

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

	return false
}

// SetParentManifest gets a reference to the given string and assigns it to the ParentManifest field.
func (o *ImportContentDigests) SetParentManifest(v string) {
	o.ParentManifest = &v
}

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

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

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

	return false
}

// SetDockerfile gets a reference to the given string and assigns it to the Dockerfile field.
func (o *ImportContentDigests) SetDockerfile(v string) {
	o.Dockerfile = &v
}

func (o ImportContentDigests) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["packages"] = o.Packages
	}
	if true {
		toSerialize["image_config"] = o.ImageConfig
	}
	if true {
		toSerialize["manifest"] = o.Manifest
	}
	if o.ParentManifest != nil {
		toSerialize["parent_manifest"] = o.ParentManifest
	}
	if o.Dockerfile != nil {
		toSerialize["dockerfile"] = o.Dockerfile
	}
	return json.Marshal(toSerialize)
}

type NullableImportContentDigests struct {
	value *ImportContentDigests
	isSet bool
}

func (v NullableImportContentDigests) Get() *ImportContentDigests {
	return v.value
}

func (v *NullableImportContentDigests) Set(val *ImportContentDigests) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableImportContentDigests(val *ImportContentDigests) *NullableImportContentDigests {
	return &NullableImportContentDigests{value: val, isSet: true}
}

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

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


