/*
Anchore Engine API Server

This is the Anchore Engine API. Provides the primary external API for users of the service.

API version: 0.1.20
Contact: nurmi@anchore.com
*/

// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.

package anchore

import (
	"encoding/json"
)

// ServiceVersionApi Api Version string
type ServiceVersionApi struct {
	// Semantic version of the api
	Version *string `json:"version,omitempty"`
}

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

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

// GetVersion returns the Version field value if set, zero value otherwise.
func (o *ServiceVersionApi) GetVersion() string {
	if o == nil || o.Version == nil {
		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 *ServiceVersionApi) GetVersionOk() (*string, bool) {
	if o == nil || o.Version == nil {
		return nil, false
	}
	return o.Version, true
}

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

	return false
}

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

func (o ServiceVersionApi) MarshalJSON() ([]byte, error) {
	toSerialize := map[string]interface{}{}
	if o.Version != nil {
		toSerialize["version"] = o.Version
	}
	return json.Marshal(toSerialize)
}

type NullableServiceVersionApi struct {
	value *ServiceVersionApi
	isSet bool
}

func (v NullableServiceVersionApi) Get() *ServiceVersionApi {
	return v.value
}

func (v *NullableServiceVersionApi) Set(val *ServiceVersionApi) {
	v.value = val
	v.isSet = true
}

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

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

func NewNullableServiceVersionApi(val *ServiceVersionApi) *NullableServiceVersionApi {
	return &NullableServiceVersionApi{value: val, isSet: true}
}

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

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


