Files
sdk/model_team_team_message_write.go

269 lines
7.3 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 TeamTeamMessageWrite type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamMessageWrite{}
// TeamTeamMessageWrite struct for TeamTeamMessageWrite
type TeamTeamMessageWrite struct {
// Files attaches blobs already uploaded to the space. A message may be files alone, with no text.
Files []TeamTeamFileIn `json:"files,omitempty"`
// ID is the channel to say it in, from the path.
Id *string `json:"id,omitempty"`
// Space names the space holding the channel. Body-only: a query string may not redirect a write.
Space *string `json:"space,omitempty"`
// Text is what to say, as plain text. It is wrapped in the client's markup on the way in, so a caller writes words rather than HTML. `<@account-uuid>` mentions a member of the space: it is stored as the platform's mention, so they are notified, and an agent mentioned this way answers.
Text *string `json:"text,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamMessageWrite TeamTeamMessageWrite
// NewTeamTeamMessageWrite instantiates a new TeamTeamMessageWrite 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 NewTeamTeamMessageWrite() *TeamTeamMessageWrite {
this := TeamTeamMessageWrite{}
return &this
}
// NewTeamTeamMessageWriteWithDefaults instantiates a new TeamTeamMessageWrite 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 NewTeamTeamMessageWriteWithDefaults() *TeamTeamMessageWrite {
this := TeamTeamMessageWrite{}
return &this
}
// GetFiles returns the Files field value if set, zero value otherwise.
func (o *TeamTeamMessageWrite) GetFiles() []TeamTeamFileIn {
if o == nil || IsNil(o.Files) {
var ret []TeamTeamFileIn
return ret
}
return o.Files
}
// GetFilesOk returns a tuple with the Files field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamMessageWrite) GetFilesOk() ([]TeamTeamFileIn, bool) {
if o == nil || IsNil(o.Files) {
return nil, false
}
return o.Files, true
}
// HasFiles returns a boolean if a field has been set.
func (o *TeamTeamMessageWrite) HasFiles() bool {
if o != nil && !IsNil(o.Files) {
return true
}
return false
}
// SetFiles gets a reference to the given []TeamTeamFileIn and assigns it to the Files field.
func (o *TeamTeamMessageWrite) SetFiles(v []TeamTeamFileIn) {
o.Files = v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) SetId(v string) {
o.Id = &v
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) SetSpace(v string) {
o.Space = &v
}
// GetText returns the Text field value if set, zero value otherwise.
func (o *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) 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 *TeamTeamMessageWrite) SetText(v string) {
o.Text = &v
}
func (o TeamTeamMessageWrite) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamMessageWrite) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Files) {
toSerialize["files"] = o.Files
}
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 *TeamTeamMessageWrite) UnmarshalJSON(data []byte) (err error) {
varTeamTeamMessageWrite := _TeamTeamMessageWrite{}
err = json.Unmarshal(data, &varTeamTeamMessageWrite)
if err != nil {
return err
}
*o = TeamTeamMessageWrite(varTeamTeamMessageWrite)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "files")
delete(additionalProperties, "id")
delete(additionalProperties, "space")
delete(additionalProperties, "text")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamMessageWrite struct {
value *TeamTeamMessageWrite
isSet bool
}
func (v NullableTeamTeamMessageWrite) Get() *TeamTeamMessageWrite {
return v.value
}
func (v *NullableTeamTeamMessageWrite) Set(val *TeamTeamMessageWrite) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamMessageWrite) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamMessageWrite) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamMessageWrite(val *TeamTeamMessageWrite) *NullableTeamTeamMessageWrite {
return &NullableTeamTeamMessageWrite{value: val, isSet: true}
}
func (v NullableTeamTeamMessageWrite) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamMessageWrite) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}