mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
7.0 KiB
Go
269 lines
7.0 KiB
Go
/*
|
|
Hanzo Cloud API
|
|
|
|
The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
|
|
API version: v1
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package hanzoai
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// checks if the MlMlResource type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &MlMlResource{}
|
|
|
|
// MlMlResource struct for MlMlResource
|
|
type MlMlResource struct {
|
|
// CreatedAt is when Kubernetes admitted the object, RFC 3339 in UTC.
|
|
CreatedAt *string `json:"createdAt,omitempty"`
|
|
// Name is the object's metadata.name, unique within the caller's namespace.
|
|
Name *string `json:"name,omitempty"`
|
|
// Spec is the resource spec, verbatim as Kubernetes stores it. Present on a single-object read, absent from a list.
|
|
Spec map[string]interface{} `json:"spec,omitempty"`
|
|
// Status is the live status kserve owns, verbatim. Absent until kserve has written one.
|
|
Status map[string]interface{} `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _MlMlResource MlMlResource
|
|
|
|
// NewMlMlResource instantiates a new MlMlResource 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 NewMlMlResource() *MlMlResource {
|
|
this := MlMlResource{}
|
|
return &this
|
|
}
|
|
|
|
// NewMlMlResourceWithDefaults instantiates a new MlMlResource 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 NewMlMlResourceWithDefaults() *MlMlResource {
|
|
this := MlMlResource{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise.
|
|
func (o *MlMlResource) GetCreatedAt() string {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedAt
|
|
}
|
|
|
|
// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MlMlResource) GetCreatedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedAt) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedAt, true
|
|
}
|
|
|
|
// HasCreatedAt returns a boolean if a field has been set.
|
|
func (o *MlMlResource) HasCreatedAt() bool {
|
|
if o != nil && !IsNil(o.CreatedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field.
|
|
func (o *MlMlResource) SetCreatedAt(v string) {
|
|
o.CreatedAt = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *MlMlResource) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MlMlResource) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *MlMlResource) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *MlMlResource) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetSpec returns the Spec field value if set, zero value otherwise.
|
|
func (o *MlMlResource) GetSpec() map[string]interface{} {
|
|
if o == nil || IsNil(o.Spec) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Spec
|
|
}
|
|
|
|
// GetSpecOk returns a tuple with the Spec field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MlMlResource) GetSpecOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Spec) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Spec, true
|
|
}
|
|
|
|
// HasSpec returns a boolean if a field has been set.
|
|
func (o *MlMlResource) HasSpec() bool {
|
|
if o != nil && !IsNil(o.Spec) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSpec gets a reference to the given map[string]interface{} and assigns it to the Spec field.
|
|
func (o *MlMlResource) SetSpec(v map[string]interface{}) {
|
|
o.Spec = v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *MlMlResource) GetStatus() map[string]interface{} {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret map[string]interface{}
|
|
return ret
|
|
}
|
|
return o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *MlMlResource) GetStatusOk() (map[string]interface{}, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return map[string]interface{}{}, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *MlMlResource) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given map[string]interface{} and assigns it to the Status field.
|
|
func (o *MlMlResource) SetStatus(v map[string]interface{}) {
|
|
o.Status = v
|
|
}
|
|
|
|
func (o MlMlResource) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o MlMlResource) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CreatedAt) {
|
|
toSerialize["createdAt"] = o.CreatedAt
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Spec) {
|
|
toSerialize["spec"] = o.Spec
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *MlMlResource) UnmarshalJSON(data []byte) (err error) {
|
|
varMlMlResource := _MlMlResource{}
|
|
|
|
err = json.Unmarshal(data, &varMlMlResource)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = MlMlResource(varMlMlResource)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "createdAt")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "spec")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableMlMlResource struct {
|
|
value *MlMlResource
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableMlMlResource) Get() *MlMlResource {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableMlMlResource) Set(val *MlMlResource) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableMlMlResource) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableMlMlResource) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableMlMlResource(val *MlMlResource) *NullableMlMlResource {
|
|
return &NullableMlMlResource{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableMlMlResource) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableMlMlResource) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|