mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
155 lines
4.0 KiB
Go
155 lines
4.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 TrainClientList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TrainClientList{}
|
|
|
|
// TrainClientList struct for TrainClientList
|
|
type TrainClientList struct {
|
|
// Clients are the org's live clients, as the engine reports them.
|
|
Clients []interface{} `json:"clients,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TrainClientList TrainClientList
|
|
|
|
// NewTrainClientList instantiates a new TrainClientList 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 NewTrainClientList() *TrainClientList {
|
|
this := TrainClientList{}
|
|
return &this
|
|
}
|
|
|
|
// NewTrainClientListWithDefaults instantiates a new TrainClientList 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 NewTrainClientListWithDefaults() *TrainClientList {
|
|
this := TrainClientList{}
|
|
return &this
|
|
}
|
|
|
|
// GetClients returns the Clients field value if set, zero value otherwise.
|
|
func (o *TrainClientList) GetClients() []interface{} {
|
|
if o == nil || IsNil(o.Clients) {
|
|
var ret []interface{}
|
|
return ret
|
|
}
|
|
return o.Clients
|
|
}
|
|
|
|
// GetClientsOk returns a tuple with the Clients field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TrainClientList) GetClientsOk() ([]interface{}, bool) {
|
|
if o == nil || IsNil(o.Clients) {
|
|
return nil, false
|
|
}
|
|
return o.Clients, true
|
|
}
|
|
|
|
// HasClients returns a boolean if a field has been set.
|
|
func (o *TrainClientList) HasClients() bool {
|
|
if o != nil && !IsNil(o.Clients) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClients gets a reference to the given []interface{} and assigns it to the Clients field.
|
|
func (o *TrainClientList) SetClients(v []interface{}) {
|
|
o.Clients = v
|
|
}
|
|
|
|
func (o TrainClientList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TrainClientList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Clients) {
|
|
toSerialize["clients"] = o.Clients
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TrainClientList) UnmarshalJSON(data []byte) (err error) {
|
|
varTrainClientList := _TrainClientList{}
|
|
|
|
err = json.Unmarshal(data, &varTrainClientList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TrainClientList(varTrainClientList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "clients")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTrainClientList struct {
|
|
value *TrainClientList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTrainClientList) Get() *TrainClientList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTrainClientList) Set(val *TrainClientList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTrainClientList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTrainClientList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTrainClientList(val *TrainClientList) *NullableTrainClientList {
|
|
return &NullableTrainClientList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTrainClientList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTrainClientList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|