mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.0 KiB
Go
193 lines
5.0 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 TaskCommentList type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaskCommentList{}
|
|
|
|
// TaskCommentList struct for TaskCommentList
|
|
type TaskCommentList struct {
|
|
// Data is the conversation. Empty is an empty array, never null.
|
|
Data []TaskComment `json:"data,omitempty"`
|
|
// Home is the GitHub repository (owner/name) the issue lives on when its board mirrors one; its conversation is read there, and Data is then empty.
|
|
Home *string `json:"home,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaskCommentList TaskCommentList
|
|
|
|
// NewTaskCommentList instantiates a new TaskCommentList 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 NewTaskCommentList() *TaskCommentList {
|
|
this := TaskCommentList{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskCommentListWithDefaults instantiates a new TaskCommentList 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 NewTaskCommentListWithDefaults() *TaskCommentList {
|
|
this := TaskCommentList{}
|
|
return &this
|
|
}
|
|
|
|
// GetData returns the Data field value if set, zero value otherwise.
|
|
func (o *TaskCommentList) GetData() []TaskComment {
|
|
if o == nil || IsNil(o.Data) {
|
|
var ret []TaskComment
|
|
return ret
|
|
}
|
|
return o.Data
|
|
}
|
|
|
|
// GetDataOk returns a tuple with the Data field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskCommentList) GetDataOk() ([]TaskComment, bool) {
|
|
if o == nil || IsNil(o.Data) {
|
|
return nil, false
|
|
}
|
|
return o.Data, true
|
|
}
|
|
|
|
// HasData returns a boolean if a field has been set.
|
|
func (o *TaskCommentList) HasData() bool {
|
|
if o != nil && !IsNil(o.Data) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetData gets a reference to the given []TaskComment and assigns it to the Data field.
|
|
func (o *TaskCommentList) SetData(v []TaskComment) {
|
|
o.Data = v
|
|
}
|
|
|
|
// GetHome returns the Home field value if set, zero value otherwise.
|
|
func (o *TaskCommentList) GetHome() string {
|
|
if o == nil || IsNil(o.Home) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Home
|
|
}
|
|
|
|
// GetHomeOk returns a tuple with the Home field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskCommentList) GetHomeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Home) {
|
|
return nil, false
|
|
}
|
|
return o.Home, true
|
|
}
|
|
|
|
// HasHome returns a boolean if a field has been set.
|
|
func (o *TaskCommentList) HasHome() bool {
|
|
if o != nil && !IsNil(o.Home) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHome gets a reference to the given string and assigns it to the Home field.
|
|
func (o *TaskCommentList) SetHome(v string) {
|
|
o.Home = &v
|
|
}
|
|
|
|
func (o TaskCommentList) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaskCommentList) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Data) {
|
|
toSerialize["data"] = o.Data
|
|
}
|
|
if !IsNil(o.Home) {
|
|
toSerialize["home"] = o.Home
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaskCommentList) UnmarshalJSON(data []byte) (err error) {
|
|
varTaskCommentList := _TaskCommentList{}
|
|
|
|
err = json.Unmarshal(data, &varTaskCommentList)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaskCommentList(varTaskCommentList)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "data")
|
|
delete(additionalProperties, "home")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaskCommentList struct {
|
|
value *TaskCommentList
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaskCommentList) Get() *TaskCommentList {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaskCommentList) Set(val *TaskCommentList) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaskCommentList) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaskCommentList) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaskCommentList(val *TaskCommentList) *NullableTaskCommentList {
|
|
return &NullableTaskCommentList{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaskCommentList) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaskCommentList) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|