mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
Go
193 lines
5.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 TeamTeamDirect type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamTeamDirect{}
|
|
|
|
// TeamTeamDirect struct for TeamTeamDirect
|
|
type TeamTeamDirect struct {
|
|
// Channel is the direct message, as the channel listing answers it.
|
|
Channel *TeamTeamChannel `json:"channel,omitempty"`
|
|
// Created is true when this call opened the conversation (201) and false when it already existed (200).
|
|
Created *bool `json:"created,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamTeamDirect TeamTeamDirect
|
|
|
|
// NewTeamTeamDirect instantiates a new TeamTeamDirect 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 NewTeamTeamDirect() *TeamTeamDirect {
|
|
this := TeamTeamDirect{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamTeamDirectWithDefaults instantiates a new TeamTeamDirect 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 NewTeamTeamDirectWithDefaults() *TeamTeamDirect {
|
|
this := TeamTeamDirect{}
|
|
return &this
|
|
}
|
|
|
|
// GetChannel returns the Channel field value if set, zero value otherwise.
|
|
func (o *TeamTeamDirect) GetChannel() TeamTeamChannel {
|
|
if o == nil || IsNil(o.Channel) {
|
|
var ret TeamTeamChannel
|
|
return ret
|
|
}
|
|
return *o.Channel
|
|
}
|
|
|
|
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDirect) GetChannelOk() (*TeamTeamChannel, bool) {
|
|
if o == nil || IsNil(o.Channel) {
|
|
return nil, false
|
|
}
|
|
return o.Channel, true
|
|
}
|
|
|
|
// HasChannel returns a boolean if a field has been set.
|
|
func (o *TeamTeamDirect) HasChannel() bool {
|
|
if o != nil && !IsNil(o.Channel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChannel gets a reference to the given TeamTeamChannel and assigns it to the Channel field.
|
|
func (o *TeamTeamDirect) SetChannel(v TeamTeamChannel) {
|
|
o.Channel = &v
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *TeamTeamDirect) GetCreated() bool {
|
|
if o == nil || IsNil(o.Created) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Created
|
|
}
|
|
|
|
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDirect) GetCreatedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Created) {
|
|
return nil, false
|
|
}
|
|
return o.Created, true
|
|
}
|
|
|
|
// HasCreated returns a boolean if a field has been set.
|
|
func (o *TeamTeamDirect) HasCreated() bool {
|
|
if o != nil && !IsNil(o.Created) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreated gets a reference to the given bool and assigns it to the Created field.
|
|
func (o *TeamTeamDirect) SetCreated(v bool) {
|
|
o.Created = &v
|
|
}
|
|
|
|
func (o TeamTeamDirect) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamTeamDirect) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Channel) {
|
|
toSerialize["channel"] = o.Channel
|
|
}
|
|
if !IsNil(o.Created) {
|
|
toSerialize["created"] = o.Created
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TeamTeamDirect) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamTeamDirect := _TeamTeamDirect{}
|
|
|
|
err = json.Unmarshal(data, &varTeamTeamDirect)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamTeamDirect(varTeamTeamDirect)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "channel")
|
|
delete(additionalProperties, "created")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTeamTeamDirect struct {
|
|
value *TeamTeamDirect
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamTeamDirect) Get() *TeamTeamDirect {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamTeamDirect) Set(val *TeamTeamDirect) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamTeamDirect) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamTeamDirect) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamTeamDirect(val *TeamTeamDirect) *NullableTeamTeamDirect {
|
|
return &NullableTeamTeamDirect{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamTeamDirect) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamTeamDirect) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|