mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
4.8 KiB
Go
193 lines
4.8 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 ToolMuteReq type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ToolMuteReq{}
|
|
|
|
// ToolMuteReq struct for ToolMuteReq
|
|
type ToolMuteReq struct {
|
|
// Mute takes these out of the caller's runs: a skill (skill_<name>), a server's tool (<server>_<tool>) or a whole server (<server>), each one the org's kit carries.
|
|
Mute []string `json:"mute,omitempty"`
|
|
// Unmute gives these back, as far as the org's kit carries them.
|
|
Unmute []string `json:"unmute,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ToolMuteReq ToolMuteReq
|
|
|
|
// NewToolMuteReq instantiates a new ToolMuteReq 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 NewToolMuteReq() *ToolMuteReq {
|
|
this := ToolMuteReq{}
|
|
return &this
|
|
}
|
|
|
|
// NewToolMuteReqWithDefaults instantiates a new ToolMuteReq 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 NewToolMuteReqWithDefaults() *ToolMuteReq {
|
|
this := ToolMuteReq{}
|
|
return &this
|
|
}
|
|
|
|
// GetMute returns the Mute field value if set, zero value otherwise.
|
|
func (o *ToolMuteReq) GetMute() []string {
|
|
if o == nil || IsNil(o.Mute) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Mute
|
|
}
|
|
|
|
// GetMuteOk returns a tuple with the Mute field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMuteReq) GetMuteOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Mute) {
|
|
return nil, false
|
|
}
|
|
return o.Mute, true
|
|
}
|
|
|
|
// HasMute returns a boolean if a field has been set.
|
|
func (o *ToolMuteReq) HasMute() bool {
|
|
if o != nil && !IsNil(o.Mute) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMute gets a reference to the given []string and assigns it to the Mute field.
|
|
func (o *ToolMuteReq) SetMute(v []string) {
|
|
o.Mute = v
|
|
}
|
|
|
|
// GetUnmute returns the Unmute field value if set, zero value otherwise.
|
|
func (o *ToolMuteReq) GetUnmute() []string {
|
|
if o == nil || IsNil(o.Unmute) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Unmute
|
|
}
|
|
|
|
// GetUnmuteOk returns a tuple with the Unmute field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ToolMuteReq) GetUnmuteOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Unmute) {
|
|
return nil, false
|
|
}
|
|
return o.Unmute, true
|
|
}
|
|
|
|
// HasUnmute returns a boolean if a field has been set.
|
|
func (o *ToolMuteReq) HasUnmute() bool {
|
|
if o != nil && !IsNil(o.Unmute) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnmute gets a reference to the given []string and assigns it to the Unmute field.
|
|
func (o *ToolMuteReq) SetUnmute(v []string) {
|
|
o.Unmute = v
|
|
}
|
|
|
|
func (o ToolMuteReq) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ToolMuteReq) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Mute) {
|
|
toSerialize["mute"] = o.Mute
|
|
}
|
|
if !IsNil(o.Unmute) {
|
|
toSerialize["unmute"] = o.Unmute
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ToolMuteReq) UnmarshalJSON(data []byte) (err error) {
|
|
varToolMuteReq := _ToolMuteReq{}
|
|
|
|
err = json.Unmarshal(data, &varToolMuteReq)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ToolMuteReq(varToolMuteReq)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "mute")
|
|
delete(additionalProperties, "unmute")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableToolMuteReq struct {
|
|
value *ToolMuteReq
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableToolMuteReq) Get() *ToolMuteReq {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableToolMuteReq) Set(val *ToolMuteReq) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableToolMuteReq) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableToolMuteReq) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableToolMuteReq(val *ToolMuteReq) *NullableToolMuteReq {
|
|
return &NullableToolMuteReq{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableToolMuteReq) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableToolMuteReq) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|