Files
sdk/model_team_collab_payload.go

231 lines
6.6 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 TeamCollabPayload type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &TeamCollabPayload{}
// TeamCollabPayload struct for TeamCollabPayload
type TeamCollabPayload struct {
// Content maps a document field to its ProseMirror markup JSON.
Content map[string]string `json:"content,omitempty"`
// Source is the blob ref a getContent reads the snapshot from. Absent means there is no snapshot to read, which answers empty content.
Source *string `json:"source,omitempty"`
// Updates carries, per field, a base64 Y.js state update encoding the SAME markup — the front computes it (markupToYDoc → encodeStateAsUpdate) so a createContent seeds the live-editing lane's update log, not just the snapshot blob. Without it a dialog-created description is invisible in the collaborative editor, which replays the ydoc log, never the snapshot.
Updates map[string]string `json:"updates,omitempty"`
AdditionalProperties map[string]interface{}
}
type _TeamCollabPayload TeamCollabPayload
// NewTeamCollabPayload instantiates a new TeamCollabPayload 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 NewTeamCollabPayload() *TeamCollabPayload {
this := TeamCollabPayload{}
return &this
}
// NewTeamCollabPayloadWithDefaults instantiates a new TeamCollabPayload 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 NewTeamCollabPayloadWithDefaults() *TeamCollabPayload {
this := TeamCollabPayload{}
return &this
}
// GetContent returns the Content field value if set, zero value otherwise.
func (o *TeamCollabPayload) GetContent() map[string]string {
if o == nil || IsNil(o.Content) {
var ret map[string]string
return ret
}
return o.Content
}
// GetContentOk returns a tuple with the Content field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamCollabPayload) GetContentOk() (map[string]string, bool) {
if o == nil || IsNil(o.Content) {
return map[string]string{}, false
}
return o.Content, true
}
// HasContent returns a boolean if a field has been set.
func (o *TeamCollabPayload) HasContent() bool {
if o != nil && !IsNil(o.Content) {
return true
}
return false
}
// SetContent gets a reference to the given map[string]string and assigns it to the Content field.
func (o *TeamCollabPayload) SetContent(v map[string]string) {
o.Content = v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *TeamCollabPayload) GetSource() string {
if o == nil || IsNil(o.Source) {
var ret string
return ret
}
return *o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamCollabPayload) GetSourceOk() (*string, bool) {
if o == nil || IsNil(o.Source) {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *TeamCollabPayload) HasSource() bool {
if o != nil && !IsNil(o.Source) {
return true
}
return false
}
// SetSource gets a reference to the given string and assigns it to the Source field.
func (o *TeamCollabPayload) SetSource(v string) {
o.Source = &v
}
// GetUpdates returns the Updates field value if set, zero value otherwise.
func (o *TeamCollabPayload) GetUpdates() map[string]string {
if o == nil || IsNil(o.Updates) {
var ret map[string]string
return ret
}
return o.Updates
}
// GetUpdatesOk returns a tuple with the Updates field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *TeamCollabPayload) GetUpdatesOk() (map[string]string, bool) {
if o == nil || IsNil(o.Updates) {
return map[string]string{}, false
}
return o.Updates, true
}
// HasUpdates returns a boolean if a field has been set.
func (o *TeamCollabPayload) HasUpdates() bool {
if o != nil && !IsNil(o.Updates) {
return true
}
return false
}
// SetUpdates gets a reference to the given map[string]string and assigns it to the Updates field.
func (o *TeamCollabPayload) SetUpdates(v map[string]string) {
o.Updates = v
}
func (o TeamCollabPayload) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o TeamCollabPayload) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Content) {
toSerialize["content"] = o.Content
}
if !IsNil(o.Source) {
toSerialize["source"] = o.Source
}
if !IsNil(o.Updates) {
toSerialize["updates"] = o.Updates
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *TeamCollabPayload) UnmarshalJSON(data []byte) (err error) {
varTeamCollabPayload := _TeamCollabPayload{}
err = json.Unmarshal(data, &varTeamCollabPayload)
if err != nil {
return err
}
*o = TeamCollabPayload(varTeamCollabPayload)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "content")
delete(additionalProperties, "source")
delete(additionalProperties, "updates")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableTeamCollabPayload struct {
value *TeamCollabPayload
isSet bool
}
func (v NullableTeamCollabPayload) Get() *TeamCollabPayload {
return v.value
}
func (v *NullableTeamCollabPayload) Set(val *TeamCollabPayload) {
v.value = val
v.isSet = true
}
func (v NullableTeamCollabPayload) IsSet() bool {
return v.isSet
}
func (v *NullableTeamCollabPayload) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableTeamCollabPayload(val *TeamCollabPayload) *NullableTeamCollabPayload {
return &NullableTeamCollabPayload{value: val, isSet: true}
}
func (v NullableTeamCollabPayload) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableTeamCollabPayload) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}