Files
sdk/model_compute_lane_model.go

231 lines
5.9 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 ComputeLaneModel type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ComputeLaneModel{}
// ComputeLaneModel struct for ComputeLaneModel
type ComputeLaneModel struct {
// ID is the weight set's id, as the node's engine loads it (triposr, wan2.2, ...).
Id *string `json:"id,omitempty"`
// Lane is the Studio render lane these weights serve first (mesh, video.wan, ...).
Lane *string `json:"lane,omitempty"`
// Licence is the weights' SPDX licence identifier (MIT, Apache-2.0, ...).
Licence *string `json:"licence,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ComputeLaneModel ComputeLaneModel
// NewComputeLaneModel instantiates a new ComputeLaneModel 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 NewComputeLaneModel() *ComputeLaneModel {
this := ComputeLaneModel{}
return &this
}
// NewComputeLaneModelWithDefaults instantiates a new ComputeLaneModel 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 NewComputeLaneModelWithDefaults() *ComputeLaneModel {
this := ComputeLaneModel{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *ComputeLaneModel) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeLaneModel) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *ComputeLaneModel) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *ComputeLaneModel) SetId(v string) {
o.Id = &v
}
// GetLane returns the Lane field value if set, zero value otherwise.
func (o *ComputeLaneModel) GetLane() string {
if o == nil || IsNil(o.Lane) {
var ret string
return ret
}
return *o.Lane
}
// GetLaneOk returns a tuple with the Lane field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeLaneModel) GetLaneOk() (*string, bool) {
if o == nil || IsNil(o.Lane) {
return nil, false
}
return o.Lane, true
}
// HasLane returns a boolean if a field has been set.
func (o *ComputeLaneModel) HasLane() bool {
if o != nil && !IsNil(o.Lane) {
return true
}
return false
}
// SetLane gets a reference to the given string and assigns it to the Lane field.
func (o *ComputeLaneModel) SetLane(v string) {
o.Lane = &v
}
// GetLicence returns the Licence field value if set, zero value otherwise.
func (o *ComputeLaneModel) GetLicence() string {
if o == nil || IsNil(o.Licence) {
var ret string
return ret
}
return *o.Licence
}
// GetLicenceOk returns a tuple with the Licence field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ComputeLaneModel) GetLicenceOk() (*string, bool) {
if o == nil || IsNil(o.Licence) {
return nil, false
}
return o.Licence, true
}
// HasLicence returns a boolean if a field has been set.
func (o *ComputeLaneModel) HasLicence() bool {
if o != nil && !IsNil(o.Licence) {
return true
}
return false
}
// SetLicence gets a reference to the given string and assigns it to the Licence field.
func (o *ComputeLaneModel) SetLicence(v string) {
o.Licence = &v
}
func (o ComputeLaneModel) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ComputeLaneModel) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Lane) {
toSerialize["lane"] = o.Lane
}
if !IsNil(o.Licence) {
toSerialize["licence"] = o.Licence
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ComputeLaneModel) UnmarshalJSON(data []byte) (err error) {
varComputeLaneModel := _ComputeLaneModel{}
err = json.Unmarshal(data, &varComputeLaneModel)
if err != nil {
return err
}
*o = ComputeLaneModel(varComputeLaneModel)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "lane")
delete(additionalProperties, "licence")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableComputeLaneModel struct {
value *ComputeLaneModel
isSet bool
}
func (v NullableComputeLaneModel) Get() *ComputeLaneModel {
return v.value
}
func (v *NullableComputeLaneModel) Set(val *ComputeLaneModel) {
v.value = val
v.isSet = true
}
func (v NullableComputeLaneModel) IsSet() bool {
return v.isSet
}
func (v *NullableComputeLaneModel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableComputeLaneModel(val *ComputeLaneModel) *NullableComputeLaneModel {
return &NullableComputeLaneModel{value: val, isSet: true}
}
func (v NullableComputeLaneModel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableComputeLaneModel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}