Files
sdk/model_team_team_reaction_write.go

231 lines
6.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 TeamTeamReactionWrite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamReactionWrite{}
// TeamTeamReactionWrite struct for TeamTeamReactionWrite
type TeamTeamReactionWrite struct {
// Emoji is the reaction, from the path (percent-encoded on the wire).
Emoji *string `json:"emoji,omitempty"`
// ID is the message, from the path.
Id *string `json:"id,omitempty"`
// Space names the space holding the message. Body-only.
Space *string `json:"space,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamReactionWrite TeamTeamReactionWrite
// NewTeamTeamReactionWrite instantiates a new TeamTeamReactionWrite 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 NewTeamTeamReactionWrite() *TeamTeamReactionWrite {
this := TeamTeamReactionWrite{}
return &this
}
// NewTeamTeamReactionWriteWithDefaults instantiates a new TeamTeamReactionWrite 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 NewTeamTeamReactionWriteWithDefaults() *TeamTeamReactionWrite {
this := TeamTeamReactionWrite{}
return &this
}
// GetEmoji returns the Emoji field value if set, zero value otherwise.
func (o *TeamTeamReactionWrite) GetEmoji() string {
if o == nil || IsNil(o.Emoji) {
var ret string
return ret
}
return *o.Emoji
}
// GetEmojiOk returns a tuple with the Emoji field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamReactionWrite) GetEmojiOk() (*string, bool) {
if o == nil || IsNil(o.Emoji) {
return nil, false
}
return o.Emoji, true
}
// HasEmoji returns a boolean if a field has been set.
func (o *TeamTeamReactionWrite) HasEmoji() bool {
if o != nil && !IsNil(o.Emoji) {
return true
}
return false
}
// SetEmoji gets a reference to the given string and assigns it to the Emoji field.
func (o *TeamTeamReactionWrite) SetEmoji(v string) {
o.Emoji = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *TeamTeamReactionWrite) 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 *TeamTeamReactionWrite) 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 *TeamTeamReactionWrite) 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 *TeamTeamReactionWrite) SetId(v string) {
o.Id = &v
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *TeamTeamReactionWrite) 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 *TeamTeamReactionWrite) 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 *TeamTeamReactionWrite) 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 *TeamTeamReactionWrite) SetSpace(v string) {
o.Space = &v
}
func (o TeamTeamReactionWrite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamReactionWrite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Emoji) {
toSerialize["emoji"] = o.Emoji
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Space) {
toSerialize["space"] = o.Space
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamTeamReactionWrite) UnmarshalJSON(data []byte) (err error) {
varTeamTeamReactionWrite := _TeamTeamReactionWrite{}
err = json.Unmarshal(data, &varTeamTeamReactionWrite)
if err != nil {
return err
}
*o = TeamTeamReactionWrite(varTeamTeamReactionWrite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "emoji")
delete(additionalProperties, "id")
delete(additionalProperties, "space")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamReactionWrite struct {
value *TeamTeamReactionWrite
isSet bool
}
func (v NullableTeamTeamReactionWrite) Get() *TeamTeamReactionWrite {
return v.value
}
func (v *NullableTeamTeamReactionWrite) Set(val *TeamTeamReactionWrite) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamReactionWrite) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamReactionWrite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamReactionWrite(val *TeamTeamReactionWrite) *NullableTeamTeamReactionWrite {
return &NullableTeamTeamReactionWrite{value: val, isSet: true}
}
func (v NullableTeamTeamReactionWrite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamReactionWrite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}