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

// PredictionJobConfigGcsSink struct for PredictionJobConfigGcsSink
type PredictionJobConfigGcsSink struct {
	Format       *FileFormat        `json:"format,omitempty"`
	Uri          *string            `json:"uri,omitempty"`
	ResultColumn *string            `json:"result_column,omitempty"`
	SaveMode     *SaveMode          `json:"save_mode,omitempty"`
	Options      *map[string]string `json:"options,omitempty"`
}

// NewPredictionJobConfigGcsSink instantiates a new PredictionJobConfigGcsSink 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 NewPredictionJobConfigGcsSink() *PredictionJobConfigGcsSink {
	this := PredictionJobConfigGcsSink{}
	var format FileFormat = FILEFORMAT_INVALID_FILE_FORMAT
	this.Format = &format
	return &this
}

// NewPredictionJobConfigGcsSinkWithDefaults instantiates a new PredictionJobConfigGcsSink 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 NewPredictionJobConfigGcsSinkWithDefaults() *PredictionJobConfigGcsSink {
	this := PredictionJobConfigGcsSink{}
	var format FileFormat = FILEFORMAT_INVALID_FILE_FORMAT
	this.Format = &format
	return &this
}

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

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

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

	return false
}

// SetFormat gets a reference to the given FileFormat and assigns it to the Format field.
func (o *PredictionJobConfigGcsSink) SetFormat(v FileFormat) {
	o.Format = &v
}

// GetUri returns the Uri field value if set, zero value otherwise.
func (o *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) SetUri(v string) {
	o.Uri = &v
}

// GetResultColumn returns the ResultColumn field value if set, zero value otherwise.
func (o *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) SetResultColumn(v string) {
	o.ResultColumn = &v
}

// GetSaveMode returns the SaveMode field value if set, zero value otherwise.
func (o *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) 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 *PredictionJobConfigGcsSink) SetSaveMode(v SaveMode) {
	o.SaveMode = &v
}

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

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

func (o PredictionJobConfigGcsSink) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Format) {
		toSerialize["format"] = o.Format
	}
	if !IsNil(o.Uri) {
		toSerialize["uri"] = o.Uri
	}
	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 NullablePredictionJobConfigGcsSink struct {
	value *PredictionJobConfigGcsSink
	isSet bool
}

func (v NullablePredictionJobConfigGcsSink) Get() *PredictionJobConfigGcsSink {
	return v.value
}

func (v *NullablePredictionJobConfigGcsSink) Set(val *PredictionJobConfigGcsSink) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePredictionJobConfigGcsSink(val *PredictionJobConfigGcsSink) *NullablePredictionJobConfigGcsSink {
	return &NullablePredictionJobConfigGcsSink{value: val, isSet: true}
}

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

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