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

// PredictionJobConfigGcsSource struct for PredictionJobConfigGcsSource
type PredictionJobConfigGcsSource struct {
	Format   *FileFormat        `json:"format,omitempty"`
	Uri      *string            `json:"uri,omitempty"`
	Features []string           `json:"features,omitempty"`
	Options  *map[string]string `json:"options,omitempty"`
}

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

// NewPredictionJobConfigGcsSourceWithDefaults instantiates a new PredictionJobConfigGcsSource 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 NewPredictionJobConfigGcsSourceWithDefaults() *PredictionJobConfigGcsSource {
	this := PredictionJobConfigGcsSource{}
	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 *PredictionJobConfigGcsSource) 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 *PredictionJobConfigGcsSource) 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 *PredictionJobConfigGcsSource) 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 *PredictionJobConfigGcsSource) SetFormat(v FileFormat) {
	o.Format = &v
}

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

// GetFeatures returns the Features field value if set, zero value otherwise.
func (o *PredictionJobConfigGcsSource) 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 *PredictionJobConfigGcsSource) 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 *PredictionJobConfigGcsSource) 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 *PredictionJobConfigGcsSource) SetFeatures(v []string) {
	o.Features = v
}

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

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

func (o PredictionJobConfigGcsSource) 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.Features) {
		toSerialize["features"] = o.Features
	}
	if !IsNil(o.Options) {
		toSerialize["options"] = o.Options
	}
	return toSerialize, nil
}

type NullablePredictionJobConfigGcsSource struct {
	value *PredictionJobConfigGcsSource
	isSet bool
}

func (v NullablePredictionJobConfigGcsSource) Get() *PredictionJobConfigGcsSource {
	return v.value
}

func (v *NullablePredictionJobConfigGcsSource) Set(val *PredictionJobConfigGcsSource) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullablePredictionJobConfigGcsSource(val *PredictionJobConfigGcsSource) *NullablePredictionJobConfigGcsSource {
	return &NullablePredictionJobConfigGcsSource{value: val, isSet: true}
}

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

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