model-registry/internal/model/openapi/model_metadata_value_one_of...

163 lines
4.2 KiB
Go

/*
Model Registry REST API
REST API for Model Registry to create and manage ML model metadata
API version: 1.0.0
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package openapi
import (
"encoding/json"
)
// checks if the MetadataValueOneOf4 type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &MetadataValueOneOf4{}
// MetadataValueOneOf4 struct for MetadataValueOneOf4
type MetadataValueOneOf4 struct {
// url describing proto value
Type *string `json:"type,omitempty"`
// Base64 encoded bytes for proto value
ProtoValue *string `json:"proto_value,omitempty"`
}
// NewMetadataValueOneOf4 instantiates a new MetadataValueOneOf4 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 NewMetadataValueOneOf4() *MetadataValueOneOf4 {
this := MetadataValueOneOf4{}
return &this
}
// NewMetadataValueOneOf4WithDefaults instantiates a new MetadataValueOneOf4 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 NewMetadataValueOneOf4WithDefaults() *MetadataValueOneOf4 {
this := MetadataValueOneOf4{}
return &this
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *MetadataValueOneOf4) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetadataValueOneOf4) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *MetadataValueOneOf4) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *MetadataValueOneOf4) SetType(v string) {
o.Type = &v
}
// GetProtoValue returns the ProtoValue field value if set, zero value otherwise.
func (o *MetadataValueOneOf4) GetProtoValue() string {
if o == nil || IsNil(o.ProtoValue) {
var ret string
return ret
}
return *o.ProtoValue
}
// GetProtoValueOk returns a tuple with the ProtoValue field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetadataValueOneOf4) GetProtoValueOk() (*string, bool) {
if o == nil || IsNil(o.ProtoValue) {
return nil, false
}
return o.ProtoValue, true
}
// HasProtoValue returns a boolean if a field has been set.
func (o *MetadataValueOneOf4) HasProtoValue() bool {
if o != nil && !IsNil(o.ProtoValue) {
return true
}
return false
}
// SetProtoValue gets a reference to the given string and assigns it to the ProtoValue field.
func (o *MetadataValueOneOf4) SetProtoValue(v string) {
o.ProtoValue = &v
}
func (o MetadataValueOneOf4) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o MetadataValueOneOf4) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.ProtoValue) {
toSerialize["proto_value"] = o.ProtoValue
}
return toSerialize, nil
}
type NullableMetadataValueOneOf4 struct {
value *MetadataValueOneOf4
isSet bool
}
func (v NullableMetadataValueOneOf4) Get() *MetadataValueOneOf4 {
return v.value
}
func (v *NullableMetadataValueOneOf4) Set(val *MetadataValueOneOf4) {
v.value = val
v.isSet = true
}
func (v NullableMetadataValueOneOf4) IsSet() bool {
return v.isSet
}
func (v *NullableMetadataValueOneOf4) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetadataValueOneOf4(val *MetadataValueOneOf4) *NullableMetadataValueOneOf4 {
return &NullableMetadataValueOneOf4{value: val, isSet: true}
}
func (v NullableMetadataValueOneOf4) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetadataValueOneOf4) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}