mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
535 lines
14 KiB
Go
535 lines
14 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 TeamTeamDoc type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamTeamDoc{}
|
|
|
|
// TeamTeamDoc struct for TeamTeamDoc
|
|
type TeamTeamDoc struct {
|
|
// Author is the account uuid that created it.
|
|
Author *string `json:"author,omitempty"`
|
|
// Collaborator is the documentId to open the body with on the /v1/team/collaborator Y.js socket: \"<space>|document:class:Document|<id>|content\".
|
|
Collaborator *string `json:"collaborator,omitempty"`
|
|
// Comments is how many comments it has.
|
|
Comments *int64 `json:"comments,omitempty"`
|
|
// CreatedOn is when it was created, unix milliseconds.
|
|
CreatedOn *int64 `json:"createdOn,omitempty"`
|
|
// ID is the document's own id.
|
|
Id *string `json:"id,omitempty"`
|
|
// ModifiedOn is when its title or place last changed, unix milliseconds. Edits to the body happen on the collaborator socket and do not move it.
|
|
ModifiedOn *int64 `json:"modifiedOn,omitempty"`
|
|
// Parent is the document this one is nested under. Empty for a document at the top of its teamspace.
|
|
Parent *string `json:"parent,omitempty"`
|
|
// Rank orders siblings: compare as plain strings, ascending.
|
|
Rank *string `json:"rank,omitempty"`
|
|
// Space is the space uuid holding it.
|
|
Space *string `json:"space,omitempty"`
|
|
// Teamspace is the teamspace it belongs to.
|
|
Teamspace *string `json:"teamspace,omitempty"`
|
|
// Title is the document's title.
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamTeamDoc TeamTeamDoc
|
|
|
|
// NewTeamTeamDoc instantiates a new TeamTeamDoc 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 NewTeamTeamDoc() *TeamTeamDoc {
|
|
this := TeamTeamDoc{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamTeamDocWithDefaults instantiates a new TeamTeamDoc 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 NewTeamTeamDocWithDefaults() *TeamTeamDoc {
|
|
this := TeamTeamDoc{}
|
|
return &this
|
|
}
|
|
|
|
// GetAuthor returns the Author field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetAuthor() string {
|
|
if o == nil || IsNil(o.Author) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Author
|
|
}
|
|
|
|
// GetAuthorOk returns a tuple with the Author field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetAuthorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Author) {
|
|
return nil, false
|
|
}
|
|
return o.Author, true
|
|
}
|
|
|
|
// HasAuthor returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasAuthor() bool {
|
|
if o != nil && !IsNil(o.Author) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAuthor gets a reference to the given string and assigns it to the Author field.
|
|
func (o *TeamTeamDoc) SetAuthor(v string) {
|
|
o.Author = &v
|
|
}
|
|
|
|
// GetCollaborator returns the Collaborator field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetCollaborator() string {
|
|
if o == nil || IsNil(o.Collaborator) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Collaborator
|
|
}
|
|
|
|
// GetCollaboratorOk returns a tuple with the Collaborator field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetCollaboratorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Collaborator) {
|
|
return nil, false
|
|
}
|
|
return o.Collaborator, true
|
|
}
|
|
|
|
// HasCollaborator returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasCollaborator() bool {
|
|
if o != nil && !IsNil(o.Collaborator) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCollaborator gets a reference to the given string and assigns it to the Collaborator field.
|
|
func (o *TeamTeamDoc) SetCollaborator(v string) {
|
|
o.Collaborator = &v
|
|
}
|
|
|
|
// GetComments returns the Comments field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetComments() int64 {
|
|
if o == nil || IsNil(o.Comments) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Comments
|
|
}
|
|
|
|
// GetCommentsOk returns a tuple with the Comments field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetCommentsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Comments) {
|
|
return nil, false
|
|
}
|
|
return o.Comments, true
|
|
}
|
|
|
|
// HasComments returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasComments() bool {
|
|
if o != nil && !IsNil(o.Comments) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetComments gets a reference to the given int64 and assigns it to the Comments field.
|
|
func (o *TeamTeamDoc) SetComments(v int64) {
|
|
o.Comments = &v
|
|
}
|
|
|
|
// GetCreatedOn returns the CreatedOn field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetCreatedOn() int64 {
|
|
if o == nil || IsNil(o.CreatedOn) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.CreatedOn
|
|
}
|
|
|
|
// GetCreatedOnOk returns a tuple with the CreatedOn field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetCreatedOnOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.CreatedOn) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedOn, true
|
|
}
|
|
|
|
// HasCreatedOn returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasCreatedOn() bool {
|
|
if o != nil && !IsNil(o.CreatedOn) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedOn gets a reference to the given int64 and assigns it to the CreatedOn field.
|
|
func (o *TeamTeamDoc) SetCreatedOn(v int64) {
|
|
o.CreatedOn = &v
|
|
}
|
|
|
|
// GetId returns the Id field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) 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 *TeamTeamDoc) 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 *TeamTeamDoc) 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 *TeamTeamDoc) SetId(v string) {
|
|
o.Id = &v
|
|
}
|
|
|
|
// GetModifiedOn returns the ModifiedOn field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetModifiedOn() int64 {
|
|
if o == nil || IsNil(o.ModifiedOn) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.ModifiedOn
|
|
}
|
|
|
|
// GetModifiedOnOk returns a tuple with the ModifiedOn field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetModifiedOnOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.ModifiedOn) {
|
|
return nil, false
|
|
}
|
|
return o.ModifiedOn, true
|
|
}
|
|
|
|
// HasModifiedOn returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasModifiedOn() bool {
|
|
if o != nil && !IsNil(o.ModifiedOn) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetModifiedOn gets a reference to the given int64 and assigns it to the ModifiedOn field.
|
|
func (o *TeamTeamDoc) SetModifiedOn(v int64) {
|
|
o.ModifiedOn = &v
|
|
}
|
|
|
|
// GetParent returns the Parent field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetParent() string {
|
|
if o == nil || IsNil(o.Parent) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Parent
|
|
}
|
|
|
|
// GetParentOk returns a tuple with the Parent field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetParentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Parent) {
|
|
return nil, false
|
|
}
|
|
return o.Parent, true
|
|
}
|
|
|
|
// HasParent returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasParent() bool {
|
|
if o != nil && !IsNil(o.Parent) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetParent gets a reference to the given string and assigns it to the Parent field.
|
|
func (o *TeamTeamDoc) SetParent(v string) {
|
|
o.Parent = &v
|
|
}
|
|
|
|
// GetRank returns the Rank field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetRank() string {
|
|
if o == nil || IsNil(o.Rank) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Rank
|
|
}
|
|
|
|
// GetRankOk returns a tuple with the Rank field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetRankOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Rank) {
|
|
return nil, false
|
|
}
|
|
return o.Rank, true
|
|
}
|
|
|
|
// HasRank returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasRank() bool {
|
|
if o != nil && !IsNil(o.Rank) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRank gets a reference to the given string and assigns it to the Rank field.
|
|
func (o *TeamTeamDoc) SetRank(v string) {
|
|
o.Rank = &v
|
|
}
|
|
|
|
// GetSpace returns the Space field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) 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 *TeamTeamDoc) 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 *TeamTeamDoc) 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 *TeamTeamDoc) SetSpace(v string) {
|
|
o.Space = &v
|
|
}
|
|
|
|
// GetTeamspace returns the Teamspace field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetTeamspace() string {
|
|
if o == nil || IsNil(o.Teamspace) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Teamspace
|
|
}
|
|
|
|
// GetTeamspaceOk returns a tuple with the Teamspace field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetTeamspaceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Teamspace) {
|
|
return nil, false
|
|
}
|
|
return o.Teamspace, true
|
|
}
|
|
|
|
// HasTeamspace returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasTeamspace() bool {
|
|
if o != nil && !IsNil(o.Teamspace) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTeamspace gets a reference to the given string and assigns it to the Teamspace field.
|
|
func (o *TeamTeamDoc) SetTeamspace(v string) {
|
|
o.Teamspace = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TeamTeamDoc) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamTeamDoc) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *TeamTeamDoc) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *TeamTeamDoc) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o TeamTeamDoc) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamTeamDoc) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Author) {
|
|
toSerialize["author"] = o.Author
|
|
}
|
|
if !IsNil(o.Collaborator) {
|
|
toSerialize["collaborator"] = o.Collaborator
|
|
}
|
|
if !IsNil(o.Comments) {
|
|
toSerialize["comments"] = o.Comments
|
|
}
|
|
if !IsNil(o.CreatedOn) {
|
|
toSerialize["createdOn"] = o.CreatedOn
|
|
}
|
|
if !IsNil(o.Id) {
|
|
toSerialize["id"] = o.Id
|
|
}
|
|
if !IsNil(o.ModifiedOn) {
|
|
toSerialize["modifiedOn"] = o.ModifiedOn
|
|
}
|
|
if !IsNil(o.Parent) {
|
|
toSerialize["parent"] = o.Parent
|
|
}
|
|
if !IsNil(o.Rank) {
|
|
toSerialize["rank"] = o.Rank
|
|
}
|
|
if !IsNil(o.Space) {
|
|
toSerialize["space"] = o.Space
|
|
}
|
|
if !IsNil(o.Teamspace) {
|
|
toSerialize["teamspace"] = o.Teamspace
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TeamTeamDoc) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamTeamDoc := _TeamTeamDoc{}
|
|
|
|
err = json.Unmarshal(data, &varTeamTeamDoc)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamTeamDoc(varTeamTeamDoc)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "author")
|
|
delete(additionalProperties, "collaborator")
|
|
delete(additionalProperties, "comments")
|
|
delete(additionalProperties, "createdOn")
|
|
delete(additionalProperties, "id")
|
|
delete(additionalProperties, "modifiedOn")
|
|
delete(additionalProperties, "parent")
|
|
delete(additionalProperties, "rank")
|
|
delete(additionalProperties, "space")
|
|
delete(additionalProperties, "teamspace")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTeamTeamDoc struct {
|
|
value *TeamTeamDoc
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamTeamDoc) Get() *TeamTeamDoc {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamTeamDoc) Set(val *TeamTeamDoc) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamTeamDoc) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamTeamDoc) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamTeamDoc(val *TeamTeamDoc) *NullableTeamTeamDoc {
|
|
return &NullableTeamTeamDoc{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamTeamDoc) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamTeamDoc) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|