Files
sdk/model_team_team_docs.go

193 lines
5.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 TeamTeamDocs type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamDocs{}
// TeamTeamDocs struct for TeamTeamDocs
type TeamTeamDocs struct {
// Docs are the documents, grouped by teamspace, then parent, then the order the Team client shows siblings in.
Docs []TeamTeamDoc `json:"docs,omitempty"`
// Teamspaces are the teamspaces the caller may see, by name — the groups a client draws the tree under.
Teamspaces []TeamTeamTeamspace `json:"teamspaces,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamDocs TeamTeamDocs
// NewTeamTeamDocs instantiates a new TeamTeamDocs 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 NewTeamTeamDocs() *TeamTeamDocs {
this := TeamTeamDocs{}
return &this
}
// NewTeamTeamDocsWithDefaults instantiates a new TeamTeamDocs 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 NewTeamTeamDocsWithDefaults() *TeamTeamDocs {
this := TeamTeamDocs{}
return &this
}
// GetDocs returns the Docs field value if set, zero value otherwise.
func (o *TeamTeamDocs) GetDocs() []TeamTeamDoc {
if o == nil || IsNil(o.Docs) {
var ret []TeamTeamDoc
return ret
}
return o.Docs
}
// GetDocsOk returns a tuple with the Docs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamDocs) GetDocsOk() ([]TeamTeamDoc, bool) {
if o == nil || IsNil(o.Docs) {
return nil, false
}
return o.Docs, true
}
// HasDocs returns a boolean if a field has been set.
func (o *TeamTeamDocs) HasDocs() bool {
if o != nil && !IsNil(o.Docs) {
return true
}
return false
}
// SetDocs gets a reference to the given []TeamTeamDoc and assigns it to the Docs field.
func (o *TeamTeamDocs) SetDocs(v []TeamTeamDoc) {
o.Docs = v
}
// GetTeamspaces returns the Teamspaces field value if set, zero value otherwise.
func (o *TeamTeamDocs) GetTeamspaces() []TeamTeamTeamspace {
if o == nil || IsNil(o.Teamspaces) {
var ret []TeamTeamTeamspace
return ret
}
return o.Teamspaces
}
// GetTeamspacesOk returns a tuple with the Teamspaces field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamTeamDocs) GetTeamspacesOk() ([]TeamTeamTeamspace, bool) {
if o == nil || IsNil(o.Teamspaces) {
return nil, false
}
return o.Teamspaces, true
}
// HasTeamspaces returns a boolean if a field has been set.
func (o *TeamTeamDocs) HasTeamspaces() bool {
if o != nil && !IsNil(o.Teamspaces) {
return true
}
return false
}
// SetTeamspaces gets a reference to the given []TeamTeamTeamspace and assigns it to the Teamspaces field.
func (o *TeamTeamDocs) SetTeamspaces(v []TeamTeamTeamspace) {
o.Teamspaces = v
}
func (o TeamTeamDocs) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamDocs) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Docs) {
toSerialize["docs"] = o.Docs
}
if !IsNil(o.Teamspaces) {
toSerialize["teamspaces"] = o.Teamspaces
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamTeamDocs) UnmarshalJSON(data []byte) (err error) {
varTeamTeamDocs := _TeamTeamDocs{}
err = json.Unmarshal(data, &varTeamTeamDocs)
if err != nil {
return err
}
*o = TeamTeamDocs(varTeamTeamDocs)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "docs")
delete(additionalProperties, "teamspaces")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamDocs struct {
value *TeamTeamDocs
isSet bool
}
func (v NullableTeamTeamDocs) Get() *TeamTeamDocs {
return v.value
}
func (v *NullableTeamTeamDocs) Set(val *TeamTeamDocs) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamDocs) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamDocs) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamDocs(val *TeamTeamDocs) *NullableTeamTeamDocs {
return &NullableTeamTeamDocs{value: val, isSet: true}
}
func (v NullableTeamTeamDocs) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamDocs) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}