Files
sdk/model_link_enroll_req.go

421 lines
11 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 LinkEnrollReq type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &LinkEnrollReq{}
// LinkEnrollReq struct for LinkEnrollReq
type LinkEnrollReq struct {
// Account is the provider-side account identifier.
Account *string `json:"account,omitempty"`
// Host is the machine's human hostname label.
Host *string `json:"host,omitempty"`
// Kind decides how the account's inference BILLS and defaults to subscription: a subscription account bills the user's own monthly plan and is metered here for visibility only, while an apikey account bills through commerce on the gateway path.
Kind *string `json:"kind,omitempty"`
// Machine is the stable machine identifier. Required, length-bounded.
Machine *string `json:"machine,omitempty"`
// OS is the machine's operating system label.
Os *string `json:"os,omitempty"`
// Plan is the provider plan label (e.g. \"Claude Max\").
Plan *string `json:"plan,omitempty"`
// Provider is the AI provider the account belongs to. Required, length-bounded.
Provider *string `json:"provider,omitempty"`
Usage interface{} `json:"usage,omitempty"`
AdditionalProperties map[string]interface{}
}
type _LinkEnrollReq LinkEnrollReq
// NewLinkEnrollReq instantiates a new LinkEnrollReq 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 NewLinkEnrollReq() *LinkEnrollReq {
this := LinkEnrollReq{}
return &this
}
// NewLinkEnrollReqWithDefaults instantiates a new LinkEnrollReq 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 NewLinkEnrollReqWithDefaults() *LinkEnrollReq {
this := LinkEnrollReq{}
return &this
}
// GetAccount returns the Account field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetAccount() string {
if o == nil || IsNil(o.Account) {
var ret string
return ret
}
return *o.Account
}
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetAccountOk() (*string, bool) {
if o == nil || IsNil(o.Account) {
return nil, false
}
return o.Account, true
}
// HasAccount returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasAccount() bool {
if o != nil && !IsNil(o.Account) {
return true
}
return false
}
// SetAccount gets a reference to the given string and assigns it to the Account field.
func (o *LinkEnrollReq) SetAccount(v string) {
o.Account = &v
}
// GetHost returns the Host field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetHost() string {
if o == nil || IsNil(o.Host) {
var ret string
return ret
}
return *o.Host
}
// GetHostOk returns a tuple with the Host field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetHostOk() (*string, bool) {
if o == nil || IsNil(o.Host) {
return nil, false
}
return o.Host, true
}
// HasHost returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasHost() bool {
if o != nil && !IsNil(o.Host) {
return true
}
return false
}
// SetHost gets a reference to the given string and assigns it to the Host field.
func (o *LinkEnrollReq) SetHost(v string) {
o.Host = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetKind() string {
if o == nil || IsNil(o.Kind) {
var ret string
return ret
}
return *o.Kind
}
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetKindOk() (*string, bool) {
if o == nil || IsNil(o.Kind) {
return nil, false
}
return o.Kind, true
}
// HasKind returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasKind() bool {
if o != nil && !IsNil(o.Kind) {
return true
}
return false
}
// SetKind gets a reference to the given string and assigns it to the Kind field.
func (o *LinkEnrollReq) SetKind(v string) {
o.Kind = &v
}
// GetMachine returns the Machine field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetMachine() string {
if o == nil || IsNil(o.Machine) {
var ret string
return ret
}
return *o.Machine
}
// GetMachineOk returns a tuple with the Machine field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetMachineOk() (*string, bool) {
if o == nil || IsNil(o.Machine) {
return nil, false
}
return o.Machine, true
}
// HasMachine returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasMachine() bool {
if o != nil && !IsNil(o.Machine) {
return true
}
return false
}
// SetMachine gets a reference to the given string and assigns it to the Machine field.
func (o *LinkEnrollReq) SetMachine(v string) {
o.Machine = &v
}
// GetOs returns the Os field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetOs() string {
if o == nil || IsNil(o.Os) {
var ret string
return ret
}
return *o.Os
}
// GetOsOk returns a tuple with the Os field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetOsOk() (*string, bool) {
if o == nil || IsNil(o.Os) {
return nil, false
}
return o.Os, true
}
// HasOs returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasOs() bool {
if o != nil && !IsNil(o.Os) {
return true
}
return false
}
// SetOs gets a reference to the given string and assigns it to the Os field.
func (o *LinkEnrollReq) SetOs(v string) {
o.Os = &v
}
// GetPlan returns the Plan field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetPlan() string {
if o == nil || IsNil(o.Plan) {
var ret string
return ret
}
return *o.Plan
}
// GetPlanOk returns a tuple with the Plan field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetPlanOk() (*string, bool) {
if o == nil || IsNil(o.Plan) {
return nil, false
}
return o.Plan, true
}
// HasPlan returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasPlan() bool {
if o != nil && !IsNil(o.Plan) {
return true
}
return false
}
// SetPlan gets a reference to the given string and assigns it to the Plan field.
func (o *LinkEnrollReq) SetPlan(v string) {
o.Plan = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *LinkEnrollReq) GetProvider() string {
if o == nil || IsNil(o.Provider) {
var ret string
return ret
}
return *o.Provider
}
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *LinkEnrollReq) GetProviderOk() (*string, bool) {
if o == nil || IsNil(o.Provider) {
return nil, false
}
return o.Provider, true
}
// HasProvider returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasProvider() bool {
if o != nil && !IsNil(o.Provider) {
return true
}
return false
}
// SetProvider gets a reference to the given string and assigns it to the Provider field.
func (o *LinkEnrollReq) SetProvider(v string) {
o.Provider = &v
}
// GetUsage returns the Usage field value if set, zero value otherwise (both if not set or set to explicit null).
func (o *LinkEnrollReq) GetUsage() interface{} {
if o == nil {
var ret interface{}
return ret
}
return o.Usage
}
// GetUsageOk returns a tuple with the Usage field value if set, nil otherwise
// and a boolean to check if the value has been set.
// NOTE: If the value is an explicit nil, `nil, true` will be returned
func (o *LinkEnrollReq) GetUsageOk() (*interface{}, bool) {
if o == nil || IsNil(o.Usage) {
return nil, false
}
return &o.Usage, true
}
// HasUsage returns a boolean if a field has been set.
func (o *LinkEnrollReq) HasUsage() bool {
if o != nil && !IsNil(o.Usage) {
return true
}
return false
}
// SetUsage gets a reference to the given interface{} and assigns it to the Usage field.
func (o *LinkEnrollReq) SetUsage(v interface{}) {
o.Usage = v
}
func (o LinkEnrollReq) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o LinkEnrollReq) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Account) {
toSerialize["account"] = o.Account
}
if !IsNil(o.Host) {
toSerialize["host"] = o.Host
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Machine) {
toSerialize["machine"] = o.Machine
}
if !IsNil(o.Os) {
toSerialize["os"] = o.Os
}
if !IsNil(o.Plan) {
toSerialize["plan"] = o.Plan
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
if o.Usage != nil {
toSerialize["usage"] = o.Usage
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *LinkEnrollReq) UnmarshalJSON(data []byte) (err error) {
varLinkEnrollReq := _LinkEnrollReq{}
err = json.Unmarshal(data, &varLinkEnrollReq)
if err != nil {
return err
}
*o = LinkEnrollReq(varLinkEnrollReq)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "account")
delete(additionalProperties, "host")
delete(additionalProperties, "kind")
delete(additionalProperties, "machine")
delete(additionalProperties, "os")
delete(additionalProperties, "plan")
delete(additionalProperties, "provider")
delete(additionalProperties, "usage")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableLinkEnrollReq struct {
value *LinkEnrollReq
isSet bool
}
func (v NullableLinkEnrollReq) Get() *LinkEnrollReq {
return v.value
}
func (v *NullableLinkEnrollReq) Set(val *LinkEnrollReq) {
v.value = val
v.isSet = true
}
func (v NullableLinkEnrollReq) IsSet() bool {
return v.isSet
}
func (v *NullableLinkEnrollReq) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLinkEnrollReq(val *LinkEnrollReq) *NullableLinkEnrollReq {
return &NullableLinkEnrollReq{value: val, isSet: true}
}
func (v NullableLinkEnrollReq) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLinkEnrollReq) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}