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