174 lines
4.3 KiB
Go
174 lines
4.3 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 MetadataProtoValue type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &MetadataProtoValue{}
|
|
|
|
// MetadataProtoValue A proto property value.
|
|
type MetadataProtoValue struct {
|
|
// url describing proto value
|
|
Type string `json:"type"`
|
|
// Base64 encoded bytes for proto value
|
|
ProtoValue string `json:"proto_value"`
|
|
MetadataType string `json:"metadataType"`
|
|
}
|
|
|
|
// NewMetadataProtoValue instantiates a new MetadataProtoValue 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 NewMetadataProtoValue(type_ string, protoValue string, metadataType string) *MetadataProtoValue {
|
|
this := MetadataProtoValue{}
|
|
this.Type = type_
|
|
this.ProtoValue = protoValue
|
|
this.MetadataType = metadataType
|
|
return &this
|
|
}
|
|
|
|
// NewMetadataProtoValueWithDefaults instantiates a new MetadataProtoValue 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 NewMetadataProtoValueWithDefaults() *MetadataProtoValue {
|
|
this := MetadataProtoValue{}
|
|
var metadataType string = "MetadataProtoValue"
|
|
this.MetadataType = metadataType
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value
|
|
func (o *MetadataProtoValue) GetType() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MetadataProtoValue) GetTypeOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Type, true
|
|
}
|
|
|
|
// SetType sets field value
|
|
func (o *MetadataProtoValue) SetType(v string) {
|
|
o.Type = v
|
|
}
|
|
|
|
// GetProtoValue returns the ProtoValue field value
|
|
func (o *MetadataProtoValue) GetProtoValue() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.ProtoValue
|
|
}
|
|
|
|
// GetProtoValueOk returns a tuple with the ProtoValue field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MetadataProtoValue) GetProtoValueOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.ProtoValue, true
|
|
}
|
|
|
|
// SetProtoValue sets field value
|
|
func (o *MetadataProtoValue) SetProtoValue(v string) {
|
|
o.ProtoValue = v
|
|
}
|
|
|
|
// GetMetadataType returns the MetadataType field value
|
|
func (o *MetadataProtoValue) 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 *MetadataProtoValue) GetMetadataTypeOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.MetadataType, true
|
|
}
|
|
|
|
// SetMetadataType sets field value
|
|
func (o *MetadataProtoValue) SetMetadataType(v string) {
|
|
o.MetadataType = v
|
|
}
|
|
|
|
func (o MetadataProtoValue) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o MetadataProtoValue) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["type"] = o.Type
|
|
toSerialize["proto_value"] = o.ProtoValue
|
|
toSerialize["metadataType"] = o.MetadataType
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableMetadataProtoValue struct {
|
|
value *MetadataProtoValue
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMetadataProtoValue) Get() *MetadataProtoValue {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMetadataProtoValue) Set(val *MetadataProtoValue) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMetadataProtoValue) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMetadataProtoValue) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMetadataProtoValue(val *MetadataProtoValue) *NullableMetadataProtoValue {
|
|
return &NullableMetadataProtoValue{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMetadataProtoValue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMetadataProtoValue) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|