Files
sdk/model_team_team_direct_open.go

193 lines
5.2 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 TeamTeamDirectOpen type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamDirectOpen{}
// TeamTeamDirectOpen struct for TeamTeamDirectOpen
type TeamTeamDirectOpen struct {
// Members are the account uuids to talk to — people or agents of the space. The caller is always in the conversation and need not name themselves; an empty list is the caller's own notes-to-self conversation.
Members []string `json:"members,omitempty"`
// Space is the space uuid. Optional for a caller in exactly one space.
Space *string `json:"space,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamDirectOpen TeamTeamDirectOpen
// NewTeamTeamDirectOpen instantiates a new TeamTeamDirectOpen 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 NewTeamTeamDirectOpen() *TeamTeamDirectOpen {
this := TeamTeamDirectOpen{}
return &this
}
// NewTeamTeamDirectOpenWithDefaults instantiates a new TeamTeamDirectOpen 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 NewTeamTeamDirectOpenWithDefaults() *TeamTeamDirectOpen {
this := TeamTeamDirectOpen{}
return &this
}
// GetMembers returns the Members field value if set, zero value otherwise.
func (o *TeamTeamDirectOpen) GetMembers() []string {
if o == nil || IsNil(o.Members) {
var ret []string
return ret
}
return o.Members
}
// GetMembersOk returns a tuple with the Members field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamDirectOpen) GetMembersOk() ([]string, bool) {
if o == nil || IsNil(o.Members) {
return nil, false
}
return o.Members, true
}
// HasMembers returns a boolean if a field has been set.
func (o *TeamTeamDirectOpen) HasMembers() bool {
if o != nil && !IsNil(o.Members) {
return true
}
return false
}
// SetMembers gets a reference to the given []string and assigns it to the Members field.
func (o *TeamTeamDirectOpen) SetMembers(v []string) {
o.Members = v
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *TeamTeamDirectOpen) GetSpace() string {
if o == nil || IsNil(o.Space) {
var ret string
return ret
}
return *o.Space
}
// GetSpaceOk returns a tuple with the Space field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamDirectOpen) GetSpaceOk() (*string, bool) {
if o == nil || IsNil(o.Space) {
return nil, false
}
return o.Space, true
}
// HasSpace returns a boolean if a field has been set.
func (o *TeamTeamDirectOpen) HasSpace() bool {
if o != nil && !IsNil(o.Space) {
return true
}
return false
}
// SetSpace gets a reference to the given string and assigns it to the Space field.
func (o *TeamTeamDirectOpen) SetSpace(v string) {
o.Space = &v
}
func (o TeamTeamDirectOpen) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamDirectOpen) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Members) {
toSerialize["members"] = o.Members
}
if !IsNil(o.Space) {
toSerialize["space"] = o.Space
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamTeamDirectOpen) UnmarshalJSON(data []byte) (err error) {
varTeamTeamDirectOpen := _TeamTeamDirectOpen{}
err = json.Unmarshal(data, &varTeamTeamDirectOpen)
if err != nil {
return err
}
*o = TeamTeamDirectOpen(varTeamTeamDirectOpen)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "members")
delete(additionalProperties, "space")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamDirectOpen struct {
value *TeamTeamDirectOpen
isSet bool
}
func (v NullableTeamTeamDirectOpen) Get() *TeamTeamDirectOpen {
return v.value
}
func (v *NullableTeamTeamDirectOpen) Set(val *TeamTeamDirectOpen) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamDirectOpen) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamDirectOpen) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamDirectOpen(val *TeamTeamDirectOpen) *NullableTeamTeamDirectOpen {
return &NullableTeamTeamDirectOpen{value: val, isSet: true}
}
func (v NullableTeamTeamDirectOpen) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamDirectOpen) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}