mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
7.7 KiB
Go
307 lines
7.7 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 BotBotMember type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &BotBotMember{}
|
|
|
|
// BotBotMember struct for BotBotMember
|
|
type BotBotMember struct {
|
|
// Active is whether the agent projects as a LIVE space member, derived from its registry status: empty, \"active\" and \"ready\" are live, anything else (archived/retired) is not. An inactive bot drops out of the roster while its past authorship survives.
|
|
Active *bool `json:"active,omitempty"`
|
|
// ID is the agent id.
|
|
Id *string `json:"id,omitempty"`
|
|
// Name is the display name.
|
|
Name *string `json:"name,omitempty"`
|
|
// PersonRef is the projected Person _id.
|
|
PersonRef *string `json:"personRef,omitempty"`
|
|
// UserID is the derived member account uuid (personUuid).
|
|
UserId *string `json:"userId,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _BotBotMember BotBotMember
|
|
|
|
// NewBotBotMember instantiates a new BotBotMember 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 NewBotBotMember() *BotBotMember {
|
|
this := BotBotMember{}
|
|
return &this
|
|
}
|
|
|
|
// NewBotBotMemberWithDefaults instantiates a new BotBotMember 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 NewBotBotMemberWithDefaults() *BotBotMember {
|
|
this := BotBotMember{}
|
|
return &this
|
|
}
|
|
|
|
// GetActive returns the Active field value if set, zero value otherwise.
|
|
func (o *BotBotMember) GetActive() bool {
|
|
if o == nil || IsNil(o.Active) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Active
|
|
}
|
|
|
|
// GetActiveOk returns a tuple with the Active field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotMember) GetActiveOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Active) {
|
|
return nil, false
|
|
}
|
|
return o.Active, true
|
|
}
|
|
|
|
// HasActive returns a boolean if a field has been set.
|
|
func (o *BotBotMember) HasActive() bool {
|
|
if o != nil && !IsNil(o.Active) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActive gets a reference to the given bool and assigns it to the Active field.
|
|
func (o *BotBotMember) SetActive(v bool) {
|
|
o.Active = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *BotBotMember) 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 *BotBotMember) 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 *BotBotMember) 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 *BotBotMember) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *BotBotMember) 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 *BotBotMember) 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 *BotBotMember) 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 *BotBotMember) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetPersonRef returns the PersonRef field value if set, zero value otherwise.
|
|
func (o *BotBotMember) GetPersonRef() string {
|
|
if o == nil || IsNil(o.PersonRef) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.PersonRef
|
|
}
|
|
|
|
// GetPersonRefOk returns a tuple with the PersonRef field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotMember) GetPersonRefOk() (*string, bool) {
|
|
if o == nil || IsNil(o.PersonRef) {
|
|
return nil, false
|
|
}
|
|
return o.PersonRef, true
|
|
}
|
|
|
|
// HasPersonRef returns a boolean if a field has been set.
|
|
func (o *BotBotMember) HasPersonRef() bool {
|
|
if o != nil && !IsNil(o.PersonRef) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPersonRef gets a reference to the given string and assigns it to the PersonRef field.
|
|
func (o *BotBotMember) SetPersonRef(v string) {
|
|
o.PersonRef = &v
|
|
}
|
|
|
|
// GetUserId returns the UserId field value if set, zero value otherwise.
|
|
func (o *BotBotMember) GetUserId() string {
|
|
if o == nil || IsNil(o.UserId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.UserId
|
|
}
|
|
|
|
// GetUserIdOk returns a tuple with the UserId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *BotBotMember) GetUserIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.UserId) {
|
|
return nil, false
|
|
}
|
|
return o.UserId, true
|
|
}
|
|
|
|
// HasUserId returns a boolean if a field has been set.
|
|
func (o *BotBotMember) HasUserId() bool {
|
|
if o != nil && !IsNil(o.UserId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUserId gets a reference to the given string and assigns it to the UserId field.
|
|
func (o *BotBotMember) SetUserId(v string) {
|
|
o.UserId = &v
|
|
}
|
|
|
|
func (o BotBotMember) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o BotBotMember) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Active) {
|
|
toSerialize["active"] = o.Active
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.PersonRef) {
|
|
toSerialize["personRef"] = o.PersonRef
|
|
}
|
|
if !IsNil(o.UserId) {
|
|
toSerialize["userId"] = o.UserId
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *BotBotMember) UnmarshalJSON(data []byte) (err error) {
|
|
varBotBotMember := _BotBotMember{}
|
|
|
|
err = json.Unmarshal(data, &varBotBotMember)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = BotBotMember(varBotBotMember)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "active")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "personRef")
|
|
delete(additionalProperties, "userId")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableBotBotMember struct {
|
|
value *BotBotMember
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableBotBotMember) Get() *BotBotMember {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableBotBotMember) Set(val *BotBotMember) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableBotBotMember) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableBotBotMember) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableBotBotMember(val *BotBotMember) *NullableBotBotMember {
|
|
return &NullableBotBotMember{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableBotBotMember) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableBotBotMember) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|