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

// CompletionResponse struct for CompletionResponse
type CompletionResponse struct {
	Choices []CompletionChoice `json:"choices"`
	Created int64 `json:"created"`
	Id string `json:"id"`
	Model string `json:"model"`
	Object string `json:"object"`
}

// NewCompletionResponse instantiates a new CompletionResponse 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 NewCompletionResponse(choices []CompletionChoice, created int64, id string, model string, object string) *CompletionResponse {
	this := CompletionResponse{}
	this.Choices = choices
	this.Created = created
	this.Id = id
	this.Model = model
	this.Object = object
	return &this
}

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

// GetChoices returns the Choices field value
func (o *CompletionResponse) GetChoices() []CompletionChoice {
	if o == nil {
		var ret []CompletionChoice
		return ret
	}

	return o.Choices
}

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

// SetChoices sets field value
func (o *CompletionResponse) SetChoices(v []CompletionChoice) {
	o.Choices = v
}

// GetCreated returns the Created field value
func (o *CompletionResponse) GetCreated() int64 {
	if o == nil {
		var ret int64
		return ret
	}

	return o.Created
}

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

// SetCreated sets field value
func (o *CompletionResponse) SetCreated(v int64) {
	o.Created = v
}

// GetId returns the Id field value
func (o *CompletionResponse) GetId() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Id
}

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

// SetId sets field value
func (o *CompletionResponse) SetId(v string) {
	o.Id = v
}

// GetModel returns the Model field value
func (o *CompletionResponse) GetModel() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Model
}

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

// SetModel sets field value
func (o *CompletionResponse) SetModel(v string) {
	o.Model = v
}

// GetObject returns the Object field value
func (o *CompletionResponse) GetObject() string {
	if o == nil {
		var ret string
		return ret
	}

	return o.Object
}

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

// SetObject sets field value
func (o *CompletionResponse) SetObject(v string) {
	o.Object = v
}

func (o CompletionResponse) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if true {
		toSerialize["choices"] = o.Choices
	}
	if true {
		toSerialize["created"] = o.Created
	}
	if true {
		toSerialize["id"] = o.Id
	}
	if true {
		toSerialize["model"] = o.Model
	}
	if true {
		toSerialize["object"] = o.Object
	}
	return json.Marshal(toSerialize)
}

type NullableCompletionResponse struct {
	value *CompletionResponse
	isSet bool
}

func (v NullableCompletionResponse) Get() *CompletionResponse {
	return v.value
}

func (v *NullableCompletionResponse) Set(val *CompletionResponse) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableCompletionResponse(val *CompletionResponse) *NullableCompletionResponse {
	return &NullableCompletionResponse{value: val, isSet: true}
}

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

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


