Files
sdk/model_team_team_doc_edit.go

307 lines
7.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 TeamTeamDocEdit type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamDocEdit{}
// TeamTeamDocEdit struct for TeamTeamDocEdit
type TeamTeamDocEdit struct {
// ID is the document, from the path.
Id *string `json:"id,omitempty"`
// Parent moves the document under another one; \"\" moves it to the top of its teamspace. It goes after its new siblings.
Parent *string `json:"parent,omitempty"`
// Space is the space uuid holding it. Body-only.
Space *string `json:"space,omitempty"`
// Teamspace moves the document — with everything nested under it — to another teamspace, at the top unless Parent names a document there.
Teamspace *string `json:"teamspace,omitempty"`
// Title renames the document. Empty reads \"Untitled\".
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamDocEdit TeamTeamDocEdit
// NewTeamTeamDocEdit instantiates a new TeamTeamDocEdit 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 NewTeamTeamDocEdit() *TeamTeamDocEdit {
this := TeamTeamDocEdit{}
return &this
}
// NewTeamTeamDocEditWithDefaults instantiates a new TeamTeamDocEdit 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 NewTeamTeamDocEditWithDefaults() *TeamTeamDocEdit {
this := TeamTeamDocEdit{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) SetId(v string) {
o.Id = &v
}
// GetParent returns the Parent field value if set, zero value otherwise.
func (o *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) SetParent(v string) {
o.Parent = &v
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) SetSpace(v string) {
o.Space = &v
}
// GetTeamspace returns the Teamspace field value if set, zero value otherwise.
func (o *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) SetTeamspace(v string) {
o.Teamspace = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) 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 *TeamTeamDocEdit) SetTitle(v string) {
o.Title = &v
}
func (o TeamTeamDocEdit) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamDocEdit) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Parent) {
toSerialize["parent"] = o.Parent
}
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 *TeamTeamDocEdit) UnmarshalJSON(data []byte) (err error) {
varTeamTeamDocEdit := _TeamTeamDocEdit{}
err = json.Unmarshal(data, &varTeamTeamDocEdit)
if err != nil {
return err
}
*o = TeamTeamDocEdit(varTeamTeamDocEdit)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "id")
delete(additionalProperties, "parent")
delete(additionalProperties, "space")
delete(additionalProperties, "teamspace")
delete(additionalProperties, "title")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamDocEdit struct {
value *TeamTeamDocEdit
isSet bool
}
func (v NullableTeamTeamDocEdit) Get() *TeamTeamDocEdit {
return v.value
}
func (v *NullableTeamTeamDocEdit) Set(val *TeamTeamDocEdit) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamDocEdit) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamDocEdit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamDocEdit(val *TeamTeamDocEdit) *NullableTeamTeamDocEdit {
return &NullableTeamTeamDocEdit{value: val, isSet: true}
}
func (v NullableTeamTeamDocEdit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamDocEdit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}