/*
Merlin

API Guide for accessing Merlin's model management, deployment, and serving functionalities

API version: 0.14.0
*/

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

package client

import (
	"encoding/json"
)

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

// PredictionJobConfigModel struct for PredictionJobConfigModel
type PredictionJobConfigModel struct {
	Type    *string                         `json:"type,omitempty"`
	Uri     *string                         `json:"uri,omitempty"`
	Result  *PredictionJobConfigModelResult `json:"result,omitempty"`
	Options *map[string]string              `json:"options,omitempty"`
}

// NewPredictionJobConfigModel instantiates a new PredictionJobConfigModel 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 NewPredictionJobConfigModel() *PredictionJobConfigModel {
	this := PredictionJobConfigModel{}
	var type_ string = "INVALID_MODEL_TYPE"
	this.Type = &type_
	return &this
}

// NewPredictionJobConfigModelWithDefaults instantiates a new PredictionJobConfigModel 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 NewPredictionJobConfigModelWithDefaults() *PredictionJobConfigModel {
	this := PredictionJobConfigModel{}
	var type_ string = "INVALID_MODEL_TYPE"
	this.Type = &type_
	return &this
}

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

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

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

	return false
}

// SetType gets a reference to the given string and assigns it to the Type field.
func (o *PredictionJobConfigModel) SetType(v string) {
	o.Type = &v
}

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

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

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

	return false
}

// SetUri gets a reference to the given string and assigns it to the Uri field.
func (o *PredictionJobConfigModel) SetUri(v string) {
	o.Uri = &v
}

// GetResult returns the Result field value if set, zero value otherwise.
func (o *PredictionJobConfigModel) GetResult() PredictionJobConfigModelResult {
	if o == nil || IsNil(o.Result) {
		var ret PredictionJobConfigModelResult
		return ret
	}
	return *o.Result
}

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

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

	return false
}

// SetResult gets a reference to the given PredictionJobConfigModelResult and assigns it to the Result field.
func (o *PredictionJobConfigModel) SetResult(v PredictionJobConfigModelResult) {
	o.Result = &v
}

// GetOptions returns the Options field value if set, zero value otherwise.
func (o *PredictionJobConfigModel) GetOptions() map[string]string {
	if o == nil || IsNil(o.Options) {
		var ret map[string]string
		return ret
	}
	return *o.Options
}

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

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

	return false
}

// SetOptions gets a reference to the given map[string]string and assigns it to the Options field.
func (o *PredictionJobConfigModel) SetOptions(v map[string]string) {
	o.Options = &v
}

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

func (o PredictionJobConfigModel) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Type) {
		toSerialize["type"] = o.Type
	}
	if !IsNil(o.Uri) {
		toSerialize["uri"] = o.Uri
	}
	if !IsNil(o.Result) {
		toSerialize["result"] = o.Result
	}
	if !IsNil(o.Options) {
		toSerialize["options"] = o.Options
	}
	return toSerialize, nil
}

type NullablePredictionJobConfigModel struct {
	value *PredictionJobConfigModel
	isSet bool
}

func (v NullablePredictionJobConfigModel) Get() *PredictionJobConfigModel {
	return v.value
}

func (v *NullablePredictionJobConfigModel) Set(val *PredictionJobConfigModel) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePredictionJobConfigModel(val *PredictionJobConfigModel) *NullablePredictionJobConfigModel {
	return &NullablePredictionJobConfigModel{value: val, isSet: true}
}

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

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