/*
1Backend

AI-native microservices platform.

API version: 0.8.2
Contact: sales@singulatron.com
*/

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

package openapi

import (
	"encoding/json"
)

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

// PromptSvcTextToTextParameters struct for PromptSvcTextToTextParameters
type PromptSvcTextToTextParameters struct {
	// Template of the prompt. Optional. If not present it's derived from ModelId.
	Template *string `json:"template,omitempty"`
}

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

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

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

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

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

	return false
}

// SetTemplate gets a reference to the given string and assigns it to the Template field.
func (o *PromptSvcTextToTextParameters) SetTemplate(v string) {
	o.Template = &v
}

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

func (o PromptSvcTextToTextParameters) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Template) {
		toSerialize["template"] = o.Template
	}
	return toSerialize, nil
}

type NullablePromptSvcTextToTextParameters struct {
	value *PromptSvcTextToTextParameters
	isSet bool
}

func (v NullablePromptSvcTextToTextParameters) Get() *PromptSvcTextToTextParameters {
	return v.value
}

func (v *NullablePromptSvcTextToTextParameters) Set(val *PromptSvcTextToTextParameters) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePromptSvcTextToTextParameters(val *PromptSvcTextToTextParameters) *NullablePromptSvcTextToTextParameters {
	return &NullablePromptSvcTextToTextParameters{value: val, isSet: true}
}

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

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


