Files
sdk/model_team_team_message_edit.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 TeamTeamMessageEdit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamMessageEdit{}
// TeamTeamMessageEdit struct for TeamTeamMessageEdit
type TeamTeamMessageEdit struct {
// ID is the message, from the path.
Id *string `json:"id,omitempty"`
// Space names the space holding it. Body-only.
Space *string `json:"space,omitempty"`
// Text is the message's new text, with the same `<@account-uuid>` mentions a new message takes. Somebody newly mentioned is notified; somebody already mentioned is not notified twice.
Text *string `json:"text,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamMessageEdit TeamTeamMessageEdit
// NewTeamTeamMessageEdit instantiates a new TeamTeamMessageEdit 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 NewTeamTeamMessageEdit() *TeamTeamMessageEdit {
this := TeamTeamMessageEdit{}
return &this
}
// NewTeamTeamMessageEditWithDefaults instantiates a new TeamTeamMessageEdit 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 NewTeamTeamMessageEditWithDefaults() *TeamTeamMessageEdit {
this := TeamTeamMessageEdit{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *TeamTeamMessageEdit) 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 *TeamTeamMessageEdit) 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 *TeamTeamMessageEdit) 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 *TeamTeamMessageEdit) SetId(v string) {
o.Id = &v
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *TeamTeamMessageEdit) 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 *TeamTeamMessageEdit) 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 *TeamTeamMessageEdit) 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 *TeamTeamMessageEdit) SetSpace(v string) {
o.Space = &v
}
// GetText returns the Text field value if set, zero value otherwise.
func (o *TeamTeamMessageEdit) GetText() string {
if o == nil || IsNil(o.Text) {
var ret string
return ret
}
return *o.Text
}
// GetTextOk returns a tuple with the Text field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamMessageEdit) GetTextOk() (*string, bool) {
if o == nil || IsNil(o.Text) {
return nil, false
}
return o.Text, true
}
// HasText returns a boolean if a field has been set.
func (o *TeamTeamMessageEdit) HasText() bool {
if o != nil && !IsNil(o.Text) {
return true
}
return false
}
// SetText gets a reference to the given string and assigns it to the Text field.
func (o *TeamTeamMessageEdit) SetText(v string) {
o.Text = &v
}
func (o TeamTeamMessageEdit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamMessageEdit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Space) {
toSerialize["space"] = o.Space
}
if !IsNil(o.Text) {
toSerialize["text"] = o.Text
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamTeamMessageEdit) UnmarshalJSON(data []byte) (err error) {
varTeamTeamMessageEdit := _TeamTeamMessageEdit{}
err = json.Unmarshal(data, &varTeamTeamMessageEdit)
if err != nil {
return err
}
*o = TeamTeamMessageEdit(varTeamTeamMessageEdit)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "space")
delete(additionalProperties, "text")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamMessageEdit struct {
value *TeamTeamMessageEdit
isSet bool
}
func (v NullableTeamTeamMessageEdit) Get() *TeamTeamMessageEdit {
return v.value
}
func (v *NullableTeamTeamMessageEdit) Set(val *TeamTeamMessageEdit) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamMessageEdit) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamMessageEdit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamMessageEdit(val *TeamTeamMessageEdit) *NullableTeamTeamMessageEdit {
return &NullableTeamTeamMessageEdit{value: val, isSet: true}
}
func (v NullableTeamTeamMessageEdit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamMessageEdit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}