mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.2 KiB
Go
193 lines
5.2 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 TeamCollabResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamCollabResult{}
|
|
|
|
// TeamCollabResult struct for TeamCollabResult
|
|
type TeamCollabResult struct {
|
|
// Content maps each document field to its value for the verb: the new blob ref after a createContent, the stored markup after a getContent.
|
|
Content map[string]string `json:"content,omitempty"`
|
|
// Error carries a SEMANTIC refusal, which this RPC reports under 200 because the client throws on result.error — auth and tenancy failures are HTTP statuses instead.
|
|
Error *string `json:"error,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamCollabResult TeamCollabResult
|
|
|
|
// NewTeamCollabResult instantiates a new TeamCollabResult 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 NewTeamCollabResult() *TeamCollabResult {
|
|
this := TeamCollabResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamCollabResultWithDefaults instantiates a new TeamCollabResult 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 NewTeamCollabResultWithDefaults() *TeamCollabResult {
|
|
this := TeamCollabResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetContent returns the Content field value if set, zero value otherwise.
|
|
func (o *TeamCollabResult) 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 *TeamCollabResult) 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 *TeamCollabResult) 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 *TeamCollabResult) SetContent(v map[string]string) {
|
|
o.Content = v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *TeamCollabResult) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamCollabResult) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *TeamCollabResult) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *TeamCollabResult) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
func (o TeamCollabResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamCollabResult) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Content) {
|
|
toSerialize["content"] = o.Content
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TeamCollabResult) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamCollabResult := _TeamCollabResult{}
|
|
|
|
err = json.Unmarshal(data, &varTeamCollabResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamCollabResult(varTeamCollabResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "content")
|
|
delete(additionalProperties, "error")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTeamCollabResult struct {
|
|
value *TeamCollabResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamCollabResult) Get() *TeamCollabResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamCollabResult) Set(val *TeamCollabResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamCollabResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamCollabResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamCollabResult(val *TeamCollabResult) *NullableTeamCollabResult {
|
|
return &NullableTeamCollabResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamCollabResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamCollabResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|