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

// PredictionJobConfigBigquerySource struct for PredictionJobConfigBigquerySource
type PredictionJobConfigBigquerySource struct {
	Table    *string            `json:"table,omitempty"`
	Features []string           `json:"features,omitempty"`
	Options  *map[string]string `json:"options,omitempty"`
}

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

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

// GetTable returns the Table field value if set, zero value otherwise.
func (o *PredictionJobConfigBigquerySource) 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 *PredictionJobConfigBigquerySource) 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 *PredictionJobConfigBigquerySource) 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 *PredictionJobConfigBigquerySource) SetTable(v string) {
	o.Table = &v
}

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

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

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

	return false
}

// SetFeatures gets a reference to the given []string and assigns it to the Features field.
func (o *PredictionJobConfigBigquerySource) SetFeatures(v []string) {
	o.Features = v
}

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

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

func (o PredictionJobConfigBigquerySource) ToMap() (map[string]interface{}, error) {
	toSerialize := map[string]interface{}{}
	if !IsNil(o.Table) {
		toSerialize["table"] = o.Table
	}
	if !IsNil(o.Features) {
		toSerialize["features"] = o.Features
	}
	if !IsNil(o.Options) {
		toSerialize["options"] = o.Options
	}
	return toSerialize, nil
}

type NullablePredictionJobConfigBigquerySource struct {
	value *PredictionJobConfigBigquerySource
	isSet bool
}

func (v NullablePredictionJobConfigBigquerySource) Get() *PredictionJobConfigBigquerySource {
	return v.value
}

func (v *NullablePredictionJobConfigBigquerySource) Set(val *PredictionJobConfigBigquerySource) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePredictionJobConfigBigquerySource(val *PredictionJobConfigBigquerySource) *NullablePredictionJobConfigBigquerySource {
	return &NullablePredictionJobConfigBigquerySource{value: val, isSet: true}
}

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

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