mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
269 lines
6.9 KiB
Go
269 lines
6.9 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 TeamTeamReplyWrite type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamTeamReplyWrite{}
|
|
|
|
// TeamTeamReplyWrite struct for TeamTeamReplyWrite
|
|
type TeamTeamReplyWrite struct {
|
|
// Files attaches blobs already uploaded to the space.
|
|
Files []TeamTeamFileIn `json:"files,omitempty"`
|
|
// ID is the message being answered, from the path.
|
|
Id *string `json:"id,omitempty"`
|
|
// Space names the space holding it. Body-only.
|
|
Space *string `json:"space,omitempty"`
|
|
// Text is the reply, with the same `<@account-uuid>` mentions a message takes.
|
|
Text *string `json:"text,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamTeamReplyWrite TeamTeamReplyWrite
|
|
|
|
// NewTeamTeamReplyWrite instantiates a new TeamTeamReplyWrite 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 NewTeamTeamReplyWrite() *TeamTeamReplyWrite {
|
|
this := TeamTeamReplyWrite{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamTeamReplyWriteWithDefaults instantiates a new TeamTeamReplyWrite 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 NewTeamTeamReplyWriteWithDefaults() *TeamTeamReplyWrite {
|
|
this := TeamTeamReplyWrite{}
|
|
return &this
|
|
}
|
|
|
|
// GetFiles returns the Files field value if set, zero value otherwise.
|
|
func (o *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) SetFiles(v []TeamTeamFileIn) {
|
|
o.Files = v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetSpace returns the Space field value if set, zero value otherwise.
|
|
func (o *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) SetSpace(v string) {
|
|
o.Space = &v
|
|
}
|
|
|
|
// GetText returns the Text field value if set, zero value otherwise.
|
|
func (o *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) SetText(v string) {
|
|
o.Text = &v
|
|
}
|
|
|
|
func (o TeamTeamReplyWrite) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamTeamReplyWrite) 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 *TeamTeamReplyWrite) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamTeamReplyWrite := _TeamTeamReplyWrite{}
|
|
|
|
err = json.Unmarshal(data, &varTeamTeamReplyWrite)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamTeamReplyWrite(varTeamTeamReplyWrite)
|
|
|
|
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 NullableTeamTeamReplyWrite struct {
|
|
value *TeamTeamReplyWrite
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamTeamReplyWrite) Get() *TeamTeamReplyWrite {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamTeamReplyWrite) Set(val *TeamTeamReplyWrite) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamTeamReplyWrite) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamTeamReplyWrite) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamTeamReplyWrite(val *TeamTeamReplyWrite) *NullableTeamTeamReplyWrite {
|
|
return &NullableTeamTeamReplyWrite{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamTeamReplyWrite) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamTeamReplyWrite) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|