145 lines
3.3 KiB
Go
145 lines
3.3 KiB
Go
/*
|
|
Model Catalog REST API
|
|
|
|
REST API for Model Registry to create and manage ML model metadata
|
|
|
|
API version: v1alpha1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package openapi
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the CatalogSource type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &CatalogSource{}
|
|
|
|
// CatalogSource A catalog source. A catalog source has CatalogModel children.
|
|
type CatalogSource struct {
|
|
// A unique identifier for a `CatalogSource`.
|
|
Id string `json:"id"`
|
|
// The name of the catalog source.
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// NewCatalogSource instantiates a new CatalogSource 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 NewCatalogSource(id string, name string) *CatalogSource {
|
|
this := CatalogSource{}
|
|
this.Id = id
|
|
this.Name = name
|
|
return &this
|
|
}
|
|
|
|
// NewCatalogSourceWithDefaults instantiates a new CatalogSource 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 NewCatalogSourceWithDefaults() *CatalogSource {
|
|
this := CatalogSource{}
|
|
return &this
|
|
}
|
|
|
|
// GetId returns the Id field value
|
|
func (o *CatalogSource) GetId() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Id
|
|
}
|
|
|
|
// GetIdOk returns a tuple with the Id field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CatalogSource) GetIdOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Id, true
|
|
}
|
|
|
|
// SetId sets field value
|
|
func (o *CatalogSource) SetId(v string) {
|
|
o.Id = v
|
|
}
|
|
|
|
// GetName returns the Name field value
|
|
func (o *CatalogSource) GetName() string {
|
|
if o == nil {
|
|
var ret string
|
|
return ret
|
|
}
|
|
|
|
return o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value
|
|
// and a boolean to check if the value has been set.
|
|
func (o *CatalogSource) GetNameOk() (*string, bool) {
|
|
if o == nil {
|
|
return nil, false
|
|
}
|
|
return &o.Name, true
|
|
}
|
|
|
|
// SetName sets field value
|
|
func (o *CatalogSource) SetName(v string) {
|
|
o.Name = v
|
|
}
|
|
|
|
func (o CatalogSource) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o CatalogSource) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
toSerialize["id"] = o.Id
|
|
toSerialize["name"] = o.Name
|
|
return toSerialize, nil
|
|
}
|
|
|
|
type NullableCatalogSource struct {
|
|
value *CatalogSource
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableCatalogSource) Get() *CatalogSource {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableCatalogSource) Set(val *CatalogSource) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableCatalogSource) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableCatalogSource) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableCatalogSource(val *CatalogSource) *NullableCatalogSource {
|
|
return &NullableCatalogSource{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableCatalogSource) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableCatalogSource) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|