/*
 * Svix API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * API version: 1.1.1
 */

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

package openapi

import (
	"encoding/json"
)

// ListResponseBackgroundTaskOut struct for ListResponseBackgroundTaskOut
type ListResponseBackgroundTaskOut struct {
	Data []BackgroundTaskOut `json:"data"`
	Done bool `json:"done"`
	Iterator NullableString `json:"iterator,omitempty"`
	PrevIterator NullableString `json:"prevIterator,omitempty"`
}

// NewListResponseBackgroundTaskOut instantiates a new ListResponseBackgroundTaskOut 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 NewListResponseBackgroundTaskOut(data []BackgroundTaskOut, done bool) *ListResponseBackgroundTaskOut {
	this := ListResponseBackgroundTaskOut{}
	this.Data = data
	this.Done = done
	return &this
}

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

// GetData returns the Data field value
func (o *ListResponseBackgroundTaskOut) GetData() []BackgroundTaskOut {
	if o == nil {
		var ret []BackgroundTaskOut
		return ret
	}

	return o.Data
}

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

// SetData sets field value
func (o *ListResponseBackgroundTaskOut) SetData(v []BackgroundTaskOut) {
	o.Data = v
}

// GetDone returns the Done field value
func (o *ListResponseBackgroundTaskOut) GetDone() bool {
	if o == nil {
		var ret bool
		return ret
	}

	return o.Done
}

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

// SetDone sets field value
func (o *ListResponseBackgroundTaskOut) SetDone(v bool) {
	o.Done = v
}

// GetIterator returns the Iterator field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ListResponseBackgroundTaskOut) GetIterator() string {
	if o == nil || o.Iterator.Get() == nil {
		var ret string
		return ret
	}
	return *o.Iterator.Get()
}

// GetIteratorOk returns a tuple with the Iterator field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ListResponseBackgroundTaskOut) GetIteratorOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return o.Iterator.Get(), o.Iterator.IsSet()
}

// HasIterator returns a boolean if a field has been set.
func (o *ListResponseBackgroundTaskOut) HasIterator() bool {
	if o != nil && o.Iterator.IsSet() {
		return true
	}

	return false
}

// SetIterator gets a reference to the given NullableString and assigns it to the Iterator field.
func (o *ListResponseBackgroundTaskOut) SetIterator(v string) {
	o.Iterator.Set(&v)
}
// SetIteratorNil sets the value for Iterator to be an explicit nil
func (o *ListResponseBackgroundTaskOut) SetIteratorNil() {
	o.Iterator.Set(nil)
}

// UnsetIterator ensures that no value is present for Iterator, not even an explicit nil
func (o *ListResponseBackgroundTaskOut) UnsetIterator() {
	o.Iterator.Unset()
}

// GetPrevIterator returns the PrevIterator field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *ListResponseBackgroundTaskOut) GetPrevIterator() string {
	if o == nil || o.PrevIterator.Get() == nil {
		var ret string
		return ret
	}
	return *o.PrevIterator.Get()
}

// GetPrevIteratorOk returns a tuple with the PrevIterator field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *ListResponseBackgroundTaskOut) GetPrevIteratorOk() (*string, bool) {
	if o == nil  {
		return nil, false
	}
	return o.PrevIterator.Get(), o.PrevIterator.IsSet()
}

// HasPrevIterator returns a boolean if a field has been set.
func (o *ListResponseBackgroundTaskOut) HasPrevIterator() bool {
	if o != nil && o.PrevIterator.IsSet() {
		return true
	}

	return false
}

// SetPrevIterator gets a reference to the given NullableString and assigns it to the PrevIterator field.
func (o *ListResponseBackgroundTaskOut) SetPrevIterator(v string) {
	o.PrevIterator.Set(&v)
}
// SetPrevIteratorNil sets the value for PrevIterator to be an explicit nil
func (o *ListResponseBackgroundTaskOut) SetPrevIteratorNil() {
	o.PrevIterator.Set(nil)
}

// UnsetPrevIterator ensures that no value is present for PrevIterator, not even an explicit nil
func (o *ListResponseBackgroundTaskOut) UnsetPrevIterator() {
	o.PrevIterator.Unset()
}

func (o ListResponseBackgroundTaskOut) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["data"] = o.Data
	}
	if true {
		toSerialize["done"] = o.Done
	}
	if o.Iterator.IsSet() {
		toSerialize["iterator"] = o.Iterator.Get()
	}
	if o.PrevIterator.IsSet() {
		toSerialize["prevIterator"] = o.PrevIterator.Get()
	}
	return json.Marshal(toSerialize)
}

type NullableListResponseBackgroundTaskOut struct {
	value *ListResponseBackgroundTaskOut
	isSet bool
}

func (v NullableListResponseBackgroundTaskOut) Get() *ListResponseBackgroundTaskOut {
	return v.value
}

func (v *NullableListResponseBackgroundTaskOut) Set(val *ListResponseBackgroundTaskOut) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableListResponseBackgroundTaskOut(val *ListResponseBackgroundTaskOut) *NullableListResponseBackgroundTaskOut {
	return &NullableListResponseBackgroundTaskOut{value: val, isSet: true}
}

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

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


