Files
sdk/model_team_team_doc_new.go

269 lines
7.1 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 TeamTeamDocNew type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamTeamDocNew{}
// TeamTeamDocNew struct for TeamTeamDocNew
type TeamTeamDocNew struct {
// Parent nests the new document under another one.
Parent *string `json:"parent,omitempty"`
// Space is the space uuid. Optional for a caller in exactly one space.
Space *string `json:"space,omitempty"`
// Teamspace is where the document goes. Optional: a document nested under a parent goes in the parent's teamspace, and a space with exactly one teamspace the caller can write needs no name — with none, the first document opens a public \"General\" teamspace for the whole space.
Teamspace *string `json:"teamspace,omitempty"`
// Title is the document's title. Empty reads \"Untitled\", as in the Team client.
Title *string `json:"title,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamTeamDocNew TeamTeamDocNew
// NewTeamTeamDocNew instantiates a new TeamTeamDocNew 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 NewTeamTeamDocNew() *TeamTeamDocNew {
this := TeamTeamDocNew{}
return &this
}
// NewTeamTeamDocNewWithDefaults instantiates a new TeamTeamDocNew 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 NewTeamTeamDocNewWithDefaults() *TeamTeamDocNew {
this := TeamTeamDocNew{}
return &this
}
// GetParent returns the Parent field value if set, zero value otherwise.
func (o *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) SetParent(v string) {
o.Parent = &v
}
// GetSpace returns the Space field value if set, zero value otherwise.
func (o *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) SetSpace(v string) {
o.Space = &v
}
// GetTeamspace returns the Teamspace field value if set, zero value otherwise.
func (o *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) SetTeamspace(v string) {
o.Teamspace = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) 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 *TeamTeamDocNew) SetTitle(v string) {
o.Title = &v
}
func (o TeamTeamDocNew) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamTeamDocNew) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
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 *TeamTeamDocNew) UnmarshalJSON(data []byte) (err error) {
varTeamTeamDocNew := _TeamTeamDocNew{}
err = json.Unmarshal(data, &varTeamTeamDocNew)
if err != nil {
return err
}
*o = TeamTeamDocNew(varTeamTeamDocNew)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "parent")
delete(additionalProperties, "space")
delete(additionalProperties, "teamspace")
delete(additionalProperties, "title")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamTeamDocNew struct {
value *TeamTeamDocNew
isSet bool
}
func (v NullableTeamTeamDocNew) Get() *TeamTeamDocNew {
return v.value
}
func (v *NullableTeamTeamDocNew) Set(val *TeamTeamDocNew) {
v.value = val
v.isSet = true
}
func (v NullableTeamTeamDocNew) IsSet() bool {
return v.isSet
}
func (v *NullableTeamTeamDocNew) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamTeamDocNew(val *TeamTeamDocNew) *NullableTeamTeamDocNew {
return &NullableTeamTeamDocNew{value: val, isSet: true}
}
func (v NullableTeamTeamDocNew) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamTeamDocNew) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}