/*
Pulp 3 API

Fetch, Upload, Organize, and Distribute Software Packages

API version: v3
Contact: pulp-list@redhat.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package pulpclient

import (
	"encoding/json"
)

// checks if the PaginatedCollectionVersionListResponseList type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PaginatedCollectionVersionListResponseList{}

// PaginatedCollectionVersionListResponseList struct for PaginatedCollectionVersionListResponseList
type PaginatedCollectionVersionListResponseList struct {
	Meta *PaginatedCollectionResponseListMeta `json:"meta,omitempty"`
	Links *PaginatedCollectionResponseListLinks `json:"links,omitempty"`
	Data []CollectionVersionListResponse `json:"data,omitempty"`
	AdditionalProperties map[string]interface{}
}

type _PaginatedCollectionVersionListResponseList PaginatedCollectionVersionListResponseList

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

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

// GetMeta returns the Meta field value if set, zero value otherwise.
func (o *PaginatedCollectionVersionListResponseList) GetMeta() PaginatedCollectionResponseListMeta {
	if o == nil || IsNil(o.Meta) {
		var ret PaginatedCollectionResponseListMeta
		return ret
	}
	return *o.Meta
}

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

// HasMeta returns a boolean if a field has been set.
func (o *PaginatedCollectionVersionListResponseList) HasMeta() bool {
	if o != nil && !IsNil(o.Meta) {
		return true
	}

	return false
}

// SetMeta gets a reference to the given PaginatedCollectionResponseListMeta and assigns it to the Meta field.
func (o *PaginatedCollectionVersionListResponseList) SetMeta(v PaginatedCollectionResponseListMeta) {
	o.Meta = &v
}

// GetLinks returns the Links field value if set, zero value otherwise.
func (o *PaginatedCollectionVersionListResponseList) GetLinks() PaginatedCollectionResponseListLinks {
	if o == nil || IsNil(o.Links) {
		var ret PaginatedCollectionResponseListLinks
		return ret
	}
	return *o.Links
}

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

// HasLinks returns a boolean if a field has been set.
func (o *PaginatedCollectionVersionListResponseList) HasLinks() bool {
	if o != nil && !IsNil(o.Links) {
		return true
	}

	return false
}

// SetLinks gets a reference to the given PaginatedCollectionResponseListLinks and assigns it to the Links field.
func (o *PaginatedCollectionVersionListResponseList) SetLinks(v PaginatedCollectionResponseListLinks) {
	o.Links = &v
}

// GetData returns the Data field value if set, zero value otherwise.
func (o *PaginatedCollectionVersionListResponseList) GetData() []CollectionVersionListResponse {
	if o == nil || IsNil(o.Data) {
		var ret []CollectionVersionListResponse
		return ret
	}
	return o.Data
}

// GetDataOk returns a tuple with the Data field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *PaginatedCollectionVersionListResponseList) GetDataOk() ([]CollectionVersionListResponse, bool) {
	if o == nil || IsNil(o.Data) {
		return nil, false
	}
	return o.Data, true
}

// HasData returns a boolean if a field has been set.
func (o *PaginatedCollectionVersionListResponseList) HasData() bool {
	if o != nil && !IsNil(o.Data) {
		return true
	}

	return false
}

// SetData gets a reference to the given []CollectionVersionListResponse and assigns it to the Data field.
func (o *PaginatedCollectionVersionListResponseList) SetData(v []CollectionVersionListResponse) {
	o.Data = v
}

func (o PaginatedCollectionVersionListResponseList) MarshalJSON() ([]byte, error) {
	toSerialize,err := o.ToMap()
	if err != nil {
		return []byte{}, err
	}
	return json.Marshal(toSerialize)
}

func (o PaginatedCollectionVersionListResponseList) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Meta) {
		toSerialize["meta"] = o.Meta
	}
	if !IsNil(o.Links) {
		toSerialize["links"] = o.Links
	}
	if !IsNil(o.Data) {
		toSerialize["data"] = o.Data
	}

	for key, value := range o.AdditionalProperties {
		toSerialize[key] = value
	}

	return toSerialize, nil
}

func (o *PaginatedCollectionVersionListResponseList) UnmarshalJSON(bytes []byte) (err error) {
	varPaginatedCollectionVersionListResponseList := _PaginatedCollectionVersionListResponseList{}

	if err = json.Unmarshal(bytes, &varPaginatedCollectionVersionListResponseList); err == nil {
		*o = PaginatedCollectionVersionListResponseList(varPaginatedCollectionVersionListResponseList)
	}

	additionalProperties := make(map[string]interface{})

	if err = json.Unmarshal(bytes, &additionalProperties); err == nil {
		delete(additionalProperties, "meta")
		delete(additionalProperties, "links")
		delete(additionalProperties, "data")
		o.AdditionalProperties = additionalProperties
	}

	return err
}

type NullablePaginatedCollectionVersionListResponseList struct {
	value *PaginatedCollectionVersionListResponseList
	isSet bool
}

func (v NullablePaginatedCollectionVersionListResponseList) Get() *PaginatedCollectionVersionListResponseList {
	return v.value
}

func (v *NullablePaginatedCollectionVersionListResponseList) Set(val *PaginatedCollectionVersionListResponseList) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePaginatedCollectionVersionListResponseList(val *PaginatedCollectionVersionListResponseList) *NullablePaginatedCollectionVersionListResponseList {
	return &NullablePaginatedCollectionVersionListResponseList{value: val, isSet: true}
}

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

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


