/*
Edge Function API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

API version: 2.0.0
*/

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

package edgefunctions

import (
	"encoding/json"
)

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

// Results struct for Results
type Results struct {
	Id *int64 `json:"id,omitempty"`
	Name *string `json:"name,omitempty"`
	Language *string `json:"language,omitempty"`
	Code *string `json:"code,omitempty"`
	JsonArgs interface{} `json:"json_args,omitempty"`
	FunctionToRun *string `json:"function_to_run,omitempty"`
	InitiatorType *string `json:"initiator_type,omitempty"`
	Active *bool `json:"active,omitempty"`
	LastEditor *string `json:"last_editor,omitempty"`
	Modified *string `json:"modified,omitempty"`
	ReferenceCount *int64 `json:"reference_count,omitempty"`
	IsProprietaryCode *bool `json:"is_proprietary_code,omitempty"`
}

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

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

// GetId returns the Id field value if set, zero value otherwise.
func (o *Results) GetId() int64 {
	if o == nil || IsNil(o.Id) {
		var ret int64
		return ret
	}
	return *o.Id
}

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

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

	return false
}

// SetId gets a reference to the given int64 and assigns it to the Id field.
func (o *Results) SetId(v int64) {
	o.Id = &v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *Results) GetName() string {
	if o == nil || IsNil(o.Name) {
		var ret string
		return ret
	}
	return *o.Name
}

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

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

	return false
}

// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Results) SetName(v string) {
	o.Name = &v
}

// GetLanguage returns the Language field value if set, zero value otherwise.
func (o *Results) GetLanguage() string {
	if o == nil || IsNil(o.Language) {
		var ret string
		return ret
	}
	return *o.Language
}

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

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

	return false
}

// SetLanguage gets a reference to the given string and assigns it to the Language field.
func (o *Results) SetLanguage(v string) {
	o.Language = &v
}

// GetCode returns the Code field value if set, zero value otherwise.
func (o *Results) GetCode() string {
	if o == nil || IsNil(o.Code) {
		var ret string
		return ret
	}
	return *o.Code
}

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

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

	return false
}

// SetCode gets a reference to the given string and assigns it to the Code field.
func (o *Results) SetCode(v string) {
	o.Code = &v
}

// GetJsonArgs returns the JsonArgs field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *Results) GetJsonArgs() interface{} {
	if o == nil {
		var ret interface{}
		return ret
	}
	return o.JsonArgs
}

// GetJsonArgsOk returns a tuple with the JsonArgs 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 *Results) GetJsonArgsOk() (*interface{}, bool) {
	if o == nil || IsNil(o.JsonArgs) {
		return nil, false
	}
	return &o.JsonArgs, true
}

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

	return false
}

// SetJsonArgs gets a reference to the given interface{} and assigns it to the JsonArgs field.
func (o *Results) SetJsonArgs(v interface{}) {
	o.JsonArgs = v
}

// GetFunctionToRun returns the FunctionToRun field value if set, zero value otherwise.
func (o *Results) GetFunctionToRun() string {
	if o == nil || IsNil(o.FunctionToRun) {
		var ret string
		return ret
	}
	return *o.FunctionToRun
}

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

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

	return false
}

// SetFunctionToRun gets a reference to the given string and assigns it to the FunctionToRun field.
func (o *Results) SetFunctionToRun(v string) {
	o.FunctionToRun = &v
}

// GetInitiatorType returns the InitiatorType field value if set, zero value otherwise.
func (o *Results) GetInitiatorType() string {
	if o == nil || IsNil(o.InitiatorType) {
		var ret string
		return ret
	}
	return *o.InitiatorType
}

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

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

	return false
}

// SetInitiatorType gets a reference to the given string and assigns it to the InitiatorType field.
func (o *Results) SetInitiatorType(v string) {
	o.InitiatorType = &v
}

// GetActive returns the Active field value if set, zero value otherwise.
func (o *Results) GetActive() bool {
	if o == nil || IsNil(o.Active) {
		var ret bool
		return ret
	}
	return *o.Active
}

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

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

	return false
}

// SetActive gets a reference to the given bool and assigns it to the Active field.
func (o *Results) SetActive(v bool) {
	o.Active = &v
}

// GetLastEditor returns the LastEditor field value if set, zero value otherwise.
func (o *Results) GetLastEditor() string {
	if o == nil || IsNil(o.LastEditor) {
		var ret string
		return ret
	}
	return *o.LastEditor
}

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

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

	return false
}

// SetLastEditor gets a reference to the given string and assigns it to the LastEditor field.
func (o *Results) SetLastEditor(v string) {
	o.LastEditor = &v
}

// GetModified returns the Modified field value if set, zero value otherwise.
func (o *Results) GetModified() string {
	if o == nil || IsNil(o.Modified) {
		var ret string
		return ret
	}
	return *o.Modified
}

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

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

	return false
}

// SetModified gets a reference to the given string and assigns it to the Modified field.
func (o *Results) SetModified(v string) {
	o.Modified = &v
}

// GetReferenceCount returns the ReferenceCount field value if set, zero value otherwise.
func (o *Results) GetReferenceCount() int64 {
	if o == nil || IsNil(o.ReferenceCount) {
		var ret int64
		return ret
	}
	return *o.ReferenceCount
}

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

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

	return false
}

// SetReferenceCount gets a reference to the given int64 and assigns it to the ReferenceCount field.
func (o *Results) SetReferenceCount(v int64) {
	o.ReferenceCount = &v
}

// GetIsProprietaryCode returns the IsProprietaryCode field value if set, zero value otherwise.
func (o *Results) GetIsProprietaryCode() bool {
	if o == nil || IsNil(o.IsProprietaryCode) {
		var ret bool
		return ret
	}
	return *o.IsProprietaryCode
}

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

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

	return false
}

// SetIsProprietaryCode gets a reference to the given bool and assigns it to the IsProprietaryCode field.
func (o *Results) SetIsProprietaryCode(v bool) {
	o.IsProprietaryCode = &v
}

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

func (o Results) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Id) {
		toSerialize["id"] = o.Id
	}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.Language) {
		toSerialize["language"] = o.Language
	}
	if !IsNil(o.Code) {
		toSerialize["code"] = o.Code
	}
	if o.JsonArgs != nil {
		toSerialize["json_args"] = o.JsonArgs
	}
	if !IsNil(o.FunctionToRun) {
		toSerialize["function_to_run"] = o.FunctionToRun
	}
	if !IsNil(o.InitiatorType) {
		toSerialize["initiator_type"] = o.InitiatorType
	}
	if !IsNil(o.Active) {
		toSerialize["active"] = o.Active
	}
	if !IsNil(o.LastEditor) {
		toSerialize["last_editor"] = o.LastEditor
	}
	if !IsNil(o.Modified) {
		toSerialize["modified"] = o.Modified
	}
	if !IsNil(o.ReferenceCount) {
		toSerialize["reference_count"] = o.ReferenceCount
	}
	if !IsNil(o.IsProprietaryCode) {
		toSerialize["is_proprietary_code"] = o.IsProprietaryCode
	}
	return toSerialize, nil
}

type NullableResults struct {
	value *Results
	isSet bool
}

func (v NullableResults) Get() *Results {
	return v.value
}

func (v *NullableResults) Set(val *Results) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableResults(val *Results) *NullableResults {
	return &NullableResults{value: val, isSet: true}
}

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

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


