/*
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 PredictionJobConfig type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &PredictionJobConfig{}

// PredictionJobConfig struct for PredictionJobConfig
type PredictionJobConfig struct {
	Version        *string                            `json:"version,omitempty"`
	Kind           *string                            `json:"kind,omitempty"`
	Name           *string                            `json:"name,omitempty"`
	BigquerySource *PredictionJobConfigBigquerySource `json:"bigquery_source,omitempty"`
	GcsSource      *PredictionJobConfigGcsSource      `json:"gcs_source,omitempty"`
	Model          *PredictionJobConfigModel          `json:"model,omitempty"`
	BigquerySink   *PredictionJobConfigBigquerySink   `json:"bigquery_sink,omitempty"`
	GcsSink        *PredictionJobConfigGcsSink        `json:"gcs_sink,omitempty"`
}

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

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

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

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

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

	return false
}

// SetVersion gets a reference to the given string and assigns it to the Version field.
func (o *PredictionJobConfig) SetVersion(v string) {
	o.Version = &v
}

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

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

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

	return false
}

// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *PredictionJobConfig) SetKind(v string) {
	o.Kind = &v
}

// GetName returns the Name field value if set, zero value otherwise.
func (o *PredictionJobConfig) 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 *PredictionJobConfig) 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 *PredictionJobConfig) 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 *PredictionJobConfig) SetName(v string) {
	o.Name = &v
}

// GetBigquerySource returns the BigquerySource field value if set, zero value otherwise.
func (o *PredictionJobConfig) GetBigquerySource() PredictionJobConfigBigquerySource {
	if o == nil || IsNil(o.BigquerySource) {
		var ret PredictionJobConfigBigquerySource
		return ret
	}
	return *o.BigquerySource
}

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

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

	return false
}

// SetBigquerySource gets a reference to the given PredictionJobConfigBigquerySource and assigns it to the BigquerySource field.
func (o *PredictionJobConfig) SetBigquerySource(v PredictionJobConfigBigquerySource) {
	o.BigquerySource = &v
}

// GetGcsSource returns the GcsSource field value if set, zero value otherwise.
func (o *PredictionJobConfig) GetGcsSource() PredictionJobConfigGcsSource {
	if o == nil || IsNil(o.GcsSource) {
		var ret PredictionJobConfigGcsSource
		return ret
	}
	return *o.GcsSource
}

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

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

	return false
}

// SetGcsSource gets a reference to the given PredictionJobConfigGcsSource and assigns it to the GcsSource field.
func (o *PredictionJobConfig) SetGcsSource(v PredictionJobConfigGcsSource) {
	o.GcsSource = &v
}

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

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

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

	return false
}

// SetModel gets a reference to the given PredictionJobConfigModel and assigns it to the Model field.
func (o *PredictionJobConfig) SetModel(v PredictionJobConfigModel) {
	o.Model = &v
}

// GetBigquerySink returns the BigquerySink field value if set, zero value otherwise.
func (o *PredictionJobConfig) GetBigquerySink() PredictionJobConfigBigquerySink {
	if o == nil || IsNil(o.BigquerySink) {
		var ret PredictionJobConfigBigquerySink
		return ret
	}
	return *o.BigquerySink
}

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

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

	return false
}

// SetBigquerySink gets a reference to the given PredictionJobConfigBigquerySink and assigns it to the BigquerySink field.
func (o *PredictionJobConfig) SetBigquerySink(v PredictionJobConfigBigquerySink) {
	o.BigquerySink = &v
}

// GetGcsSink returns the GcsSink field value if set, zero value otherwise.
func (o *PredictionJobConfig) GetGcsSink() PredictionJobConfigGcsSink {
	if o == nil || IsNil(o.GcsSink) {
		var ret PredictionJobConfigGcsSink
		return ret
	}
	return *o.GcsSink
}

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

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

	return false
}

// SetGcsSink gets a reference to the given PredictionJobConfigGcsSink and assigns it to the GcsSink field.
func (o *PredictionJobConfig) SetGcsSink(v PredictionJobConfigGcsSink) {
	o.GcsSink = &v
}

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

func (o PredictionJobConfig) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Version) {
		toSerialize["version"] = o.Version
	}
	if !IsNil(o.Kind) {
		toSerialize["kind"] = o.Kind
	}
	if !IsNil(o.Name) {
		toSerialize["name"] = o.Name
	}
	if !IsNil(o.BigquerySource) {
		toSerialize["bigquery_source"] = o.BigquerySource
	}
	if !IsNil(o.GcsSource) {
		toSerialize["gcs_source"] = o.GcsSource
	}
	if !IsNil(o.Model) {
		toSerialize["model"] = o.Model
	}
	if !IsNil(o.BigquerySink) {
		toSerialize["bigquery_sink"] = o.BigquerySink
	}
	if !IsNil(o.GcsSink) {
		toSerialize["gcs_sink"] = o.GcsSink
	}
	return toSerialize, nil
}

type NullablePredictionJobConfig struct {
	value *PredictionJobConfig
	isSet bool
}

func (v NullablePredictionJobConfig) Get() *PredictionJobConfig {
	return v.value
}

func (v *NullablePredictionJobConfig) Set(val *PredictionJobConfig) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePredictionJobConfig(val *PredictionJobConfig) *NullablePredictionJobConfig {
	return &NullablePredictionJobConfig{value: val, isSet: true}
}

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

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