model-registry/pkg/openapi/model_metadata_double_value.go

145 lines
3.8 KiB
Go

/*
Model Registry REST API
REST API for Model Registry to create and manage ML model metadata
API version: v1alpha3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the MetadataDoubleValue type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MetadataDoubleValue{}
// MetadataDoubleValue A double property value.
type MetadataDoubleValue struct {
DoubleValue float64 `json:"double_value"`
MetadataType string `json:"metadataType"`
}
// NewMetadataDoubleValue instantiates a new MetadataDoubleValue 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 NewMetadataDoubleValue(doubleValue float64, metadataType string) *MetadataDoubleValue {
this := MetadataDoubleValue{}
this.DoubleValue = doubleValue
this.MetadataType = metadataType
return &this
}
// NewMetadataDoubleValueWithDefaults instantiates a new MetadataDoubleValue 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 NewMetadataDoubleValueWithDefaults() *MetadataDoubleValue {
this := MetadataDoubleValue{}
var metadataType string = "MetadataDoubleValue"
this.MetadataType = metadataType
return &this
}
// GetDoubleValue returns the DoubleValue field value
func (o *MetadataDoubleValue) GetDoubleValue() float64 {
if o == nil {
var ret float64
return ret
}
return o.DoubleValue
}
// GetDoubleValueOk returns a tuple with the DoubleValue field value
// and a boolean to check if the value has been set.
func (o *MetadataDoubleValue) GetDoubleValueOk() (*float64, bool) {
if o == nil {
return nil, false
}
return &o.DoubleValue, true
}
// SetDoubleValue sets field value
func (o *MetadataDoubleValue) SetDoubleValue(v float64) {
o.DoubleValue = v
}
// GetMetadataType returns the MetadataType field value
func (o *MetadataDoubleValue) GetMetadataType() string {
if o == nil {
var ret string
return ret
}
return o.MetadataType
}
// GetMetadataTypeOk returns a tuple with the MetadataType field value
// and a boolean to check if the value has been set.
func (o *MetadataDoubleValue) GetMetadataTypeOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.MetadataType, true
}
// SetMetadataType sets field value
func (o *MetadataDoubleValue) SetMetadataType(v string) {
o.MetadataType = v
}
func (o MetadataDoubleValue) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MetadataDoubleValue) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
toSerialize["double_value"] = o.DoubleValue
toSerialize["metadataType"] = o.MetadataType
return toSerialize, nil
}
type NullableMetadataDoubleValue struct {
value *MetadataDoubleValue
isSet bool
}
func (v NullableMetadataDoubleValue) Get() *MetadataDoubleValue {
return v.value
}
func (v *NullableMetadataDoubleValue) Set(val *MetadataDoubleValue) {
v.value = val
v.isSet = true
}
func (v NullableMetadataDoubleValue) IsSet() bool {
return v.isSet
}
func (v *NullableMetadataDoubleValue) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetadataDoubleValue(val *MetadataDoubleValue) *NullableMetadataDoubleValue {
return &NullableMetadataDoubleValue{value: val, isSet: true}
}
func (v NullableMetadataDoubleValue) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetadataDoubleValue) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}