mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.3 KiB
Go
231 lines
6.3 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 TeamCollabRequest type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TeamCollabRequest{}
|
|
|
|
// TeamCollabRequest struct for TeamCollabRequest
|
|
type TeamCollabRequest struct {
|
|
// DocumentID addresses the document field, as \"<spaceUuid>|<objectClass>|<objectId>|<objectAttr>\" — the collaborator-client encodeDocumentId shape, from the path.
|
|
DocumentId *string `json:"documentId,omitempty"`
|
|
// Method is the verb: createContent, updateContent or getContent.
|
|
Method *string `json:"method,omitempty"`
|
|
// Payload is the verb's argument.
|
|
Payload *TeamCollabPayload `json:"payload,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TeamCollabRequest TeamCollabRequest
|
|
|
|
// NewTeamCollabRequest instantiates a new TeamCollabRequest 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 NewTeamCollabRequest() *TeamCollabRequest {
|
|
this := TeamCollabRequest{}
|
|
return &this
|
|
}
|
|
|
|
// NewTeamCollabRequestWithDefaults instantiates a new TeamCollabRequest 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 NewTeamCollabRequestWithDefaults() *TeamCollabRequest {
|
|
this := TeamCollabRequest{}
|
|
return &this
|
|
}
|
|
|
|
// GetDocumentId returns the DocumentId field value if set, zero value otherwise.
|
|
func (o *TeamCollabRequest) GetDocumentId() string {
|
|
if o == nil || IsNil(o.DocumentId) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DocumentId
|
|
}
|
|
|
|
// GetDocumentIdOk returns a tuple with the DocumentId field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamCollabRequest) GetDocumentIdOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DocumentId) {
|
|
return nil, false
|
|
}
|
|
return o.DocumentId, true
|
|
}
|
|
|
|
// HasDocumentId returns a boolean if a field has been set.
|
|
func (o *TeamCollabRequest) HasDocumentId() bool {
|
|
if o != nil && !IsNil(o.DocumentId) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocumentId gets a reference to the given string and assigns it to the DocumentId field.
|
|
func (o *TeamCollabRequest) SetDocumentId(v string) {
|
|
o.DocumentId = &v
|
|
}
|
|
|
|
// GetMethod returns the Method field value if set, zero value otherwise.
|
|
func (o *TeamCollabRequest) GetMethod() string {
|
|
if o == nil || IsNil(o.Method) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Method
|
|
}
|
|
|
|
// GetMethodOk returns a tuple with the Method field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamCollabRequest) GetMethodOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Method) {
|
|
return nil, false
|
|
}
|
|
return o.Method, true
|
|
}
|
|
|
|
// HasMethod returns a boolean if a field has been set.
|
|
func (o *TeamCollabRequest) HasMethod() bool {
|
|
if o != nil && !IsNil(o.Method) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetMethod gets a reference to the given string and assigns it to the Method field.
|
|
func (o *TeamCollabRequest) SetMethod(v string) {
|
|
o.Method = &v
|
|
}
|
|
|
|
// GetPayload returns the Payload field value if set, zero value otherwise.
|
|
func (o *TeamCollabRequest) GetPayload() TeamCollabPayload {
|
|
if o == nil || IsNil(o.Payload) {
|
|
var ret TeamCollabPayload
|
|
return ret
|
|
}
|
|
return *o.Payload
|
|
}
|
|
|
|
// GetPayloadOk returns a tuple with the Payload field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TeamCollabRequest) GetPayloadOk() (*TeamCollabPayload, bool) {
|
|
if o == nil || IsNil(o.Payload) {
|
|
return nil, false
|
|
}
|
|
return o.Payload, true
|
|
}
|
|
|
|
// HasPayload returns a boolean if a field has been set.
|
|
func (o *TeamCollabRequest) HasPayload() bool {
|
|
if o != nil && !IsNil(o.Payload) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPayload gets a reference to the given TeamCollabPayload and assigns it to the Payload field.
|
|
func (o *TeamCollabRequest) SetPayload(v TeamCollabPayload) {
|
|
o.Payload = &v
|
|
}
|
|
|
|
func (o TeamCollabRequest) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TeamCollabRequest) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.DocumentId) {
|
|
toSerialize["documentId"] = o.DocumentId
|
|
}
|
|
if !IsNil(o.Method) {
|
|
toSerialize["method"] = o.Method
|
|
}
|
|
if !IsNil(o.Payload) {
|
|
toSerialize["payload"] = o.Payload
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TeamCollabRequest) UnmarshalJSON(data []byte) (err error) {
|
|
varTeamCollabRequest := _TeamCollabRequest{}
|
|
|
|
err = json.Unmarshal(data, &varTeamCollabRequest)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TeamCollabRequest(varTeamCollabRequest)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "documentId")
|
|
delete(additionalProperties, "method")
|
|
delete(additionalProperties, "payload")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTeamCollabRequest struct {
|
|
value *TeamCollabRequest
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTeamCollabRequest) Get() *TeamCollabRequest {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTeamCollabRequest) Set(val *TeamCollabRequest) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTeamCollabRequest) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTeamCollabRequest) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTeamCollabRequest(val *TeamCollabRequest) *NullableTeamCollabRequest {
|
|
return &NullableTeamCollabRequest{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTeamCollabRequest) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTeamCollabRequest) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|