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

// PredictionJobConfigBigquerySink struct for PredictionJobConfigBigquerySink
type PredictionJobConfigBigquerySink struct {
	Table         *string            `json:"table,omitempty"`
	StagingBucket *string            `json:"staging_bucket,omitempty"`
	ResultColumn  *string            `json:"result_column,omitempty"`
	SaveMode      *SaveMode          `json:"save_mode,omitempty"`
	Options       *map[string]string `json:"options,omitempty"`
}

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

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

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

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

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

	return false
}

// SetTable gets a reference to the given string and assigns it to the Table field.
func (o *PredictionJobConfigBigquerySink) SetTable(v string) {
	o.Table = &v
}

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

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

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

	return false
}

// SetStagingBucket gets a reference to the given string and assigns it to the StagingBucket field.
func (o *PredictionJobConfigBigquerySink) SetStagingBucket(v string) {
	o.StagingBucket = &v
}

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

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

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

	return false
}

// SetResultColumn gets a reference to the given string and assigns it to the ResultColumn field.
func (o *PredictionJobConfigBigquerySink) SetResultColumn(v string) {
	o.ResultColumn = &v
}

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

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

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

	return false
}

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

// GetOptions returns the Options field value if set, zero value otherwise.
func (o *PredictionJobConfigBigquerySink) 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 *PredictionJobConfigBigquerySink) 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 *PredictionJobConfigBigquerySink) 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 *PredictionJobConfigBigquerySink) SetOptions(v map[string]string) {
	o.Options = &v
}

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

func (o PredictionJobConfigBigquerySink) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Table) {
		toSerialize["table"] = o.Table
	}
	if !IsNil(o.StagingBucket) {
		toSerialize["staging_bucket"] = o.StagingBucket
	}
	if !IsNil(o.ResultColumn) {
		toSerialize["result_column"] = o.ResultColumn
	}
	if !IsNil(o.SaveMode) {
		toSerialize["save_mode"] = o.SaveMode
	}
	if !IsNil(o.Options) {
		toSerialize["options"] = o.Options
	}
	return toSerialize, nil
}

type NullablePredictionJobConfigBigquerySink struct {
	value *PredictionJobConfigBigquerySink
	isSet bool
}

func (v NullablePredictionJobConfigBigquerySink) Get() *PredictionJobConfigBigquerySink {
	return v.value
}

func (v *NullablePredictionJobConfigBigquerySink) Set(val *PredictionJobConfigBigquerySink) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePredictionJobConfigBigquerySink(val *PredictionJobConfigBigquerySink) *NullablePredictionJobConfigBigquerySink {
	return &NullablePredictionJobConfigBigquerySink{value: val, isSet: true}
}

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

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