mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
820 lines
20 KiB
Go
820 lines
20 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 Task type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &Task{}
|
|
|
|
// Task struct for Task
|
|
type Task struct {
|
|
Activity *string `json:"activity,omitempty"`
|
|
CreatedTime *string `json:"createdTime,omitempty"`
|
|
DisplayName *string `json:"displayName,omitempty"`
|
|
DocumentText *string `json:"documentText,omitempty"`
|
|
DocumentUrl *string `json:"documentUrl,omitempty"`
|
|
Example *string `json:"example,omitempty"`
|
|
Grade *string `json:"grade,omitempty"`
|
|
Labels []string `json:"labels,omitempty"`
|
|
Log *string `json:"log,omitempty"`
|
|
Name *string `json:"name,omitempty"`
|
|
Owner *string `json:"owner,omitempty"`
|
|
Path *string `json:"path,omitempty"`
|
|
Provider *string `json:"provider,omitempty"`
|
|
Result *string `json:"result,omitempty"`
|
|
Scale *string `json:"scale,omitempty"`
|
|
Score *float32 `json:"score,omitempty"`
|
|
Subject *string `json:"subject,omitempty"`
|
|
Topic *string `json:"topic,omitempty"`
|
|
Type *string `json:"type,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _Task Task
|
|
|
|
// NewTask instantiates a new Task 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 NewTask() *Task {
|
|
this := Task{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskWithDefaults instantiates a new Task 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 NewTaskWithDefaults() *Task {
|
|
this := Task{}
|
|
return &this
|
|
}
|
|
|
|
// GetActivity returns the Activity field value if set, zero value otherwise.
|
|
func (o *Task) GetActivity() string {
|
|
if o == nil || IsNil(o.Activity) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Activity
|
|
}
|
|
|
|
// GetActivityOk returns a tuple with the Activity field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetActivityOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Activity) {
|
|
return nil, false
|
|
}
|
|
return o.Activity, true
|
|
}
|
|
|
|
// HasActivity returns a boolean if a field has been set.
|
|
func (o *Task) HasActivity() bool {
|
|
if o != nil && !IsNil(o.Activity) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetActivity gets a reference to the given string and assigns it to the Activity field.
|
|
func (o *Task) SetActivity(v string) {
|
|
o.Activity = &v
|
|
}
|
|
|
|
// GetCreatedTime returns the CreatedTime field value if set, zero value otherwise.
|
|
func (o *Task) GetCreatedTime() string {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CreatedTime
|
|
}
|
|
|
|
// GetCreatedTimeOk returns a tuple with the CreatedTime field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetCreatedTimeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CreatedTime) {
|
|
return nil, false
|
|
}
|
|
return o.CreatedTime, true
|
|
}
|
|
|
|
// HasCreatedTime returns a boolean if a field has been set.
|
|
func (o *Task) HasCreatedTime() bool {
|
|
if o != nil && !IsNil(o.CreatedTime) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCreatedTime gets a reference to the given string and assigns it to the CreatedTime field.
|
|
func (o *Task) SetCreatedTime(v string) {
|
|
o.CreatedTime = &v
|
|
}
|
|
|
|
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
|
|
func (o *Task) GetDisplayName() string {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DisplayName
|
|
}
|
|
|
|
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetDisplayNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DisplayName) {
|
|
return nil, false
|
|
}
|
|
return o.DisplayName, true
|
|
}
|
|
|
|
// HasDisplayName returns a boolean if a field has been set.
|
|
func (o *Task) HasDisplayName() bool {
|
|
if o != nil && !IsNil(o.DisplayName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
|
|
func (o *Task) SetDisplayName(v string) {
|
|
o.DisplayName = &v
|
|
}
|
|
|
|
// GetDocumentText returns the DocumentText field value if set, zero value otherwise.
|
|
func (o *Task) GetDocumentText() string {
|
|
if o == nil || IsNil(o.DocumentText) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DocumentText
|
|
}
|
|
|
|
// GetDocumentTextOk returns a tuple with the DocumentText field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetDocumentTextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DocumentText) {
|
|
return nil, false
|
|
}
|
|
return o.DocumentText, true
|
|
}
|
|
|
|
// HasDocumentText returns a boolean if a field has been set.
|
|
func (o *Task) HasDocumentText() bool {
|
|
if o != nil && !IsNil(o.DocumentText) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocumentText gets a reference to the given string and assigns it to the DocumentText field.
|
|
func (o *Task) SetDocumentText(v string) {
|
|
o.DocumentText = &v
|
|
}
|
|
|
|
// GetDocumentUrl returns the DocumentUrl field value if set, zero value otherwise.
|
|
func (o *Task) GetDocumentUrl() string {
|
|
if o == nil || IsNil(o.DocumentUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DocumentUrl
|
|
}
|
|
|
|
// GetDocumentUrlOk returns a tuple with the DocumentUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetDocumentUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DocumentUrl) {
|
|
return nil, false
|
|
}
|
|
return o.DocumentUrl, true
|
|
}
|
|
|
|
// HasDocumentUrl returns a boolean if a field has been set.
|
|
func (o *Task) HasDocumentUrl() bool {
|
|
if o != nil && !IsNil(o.DocumentUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocumentUrl gets a reference to the given string and assigns it to the DocumentUrl field.
|
|
func (o *Task) SetDocumentUrl(v string) {
|
|
o.DocumentUrl = &v
|
|
}
|
|
|
|
// GetExample returns the Example field value if set, zero value otherwise.
|
|
func (o *Task) GetExample() string {
|
|
if o == nil || IsNil(o.Example) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Example
|
|
}
|
|
|
|
// GetExampleOk returns a tuple with the Example field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetExampleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Example) {
|
|
return nil, false
|
|
}
|
|
return o.Example, true
|
|
}
|
|
|
|
// HasExample returns a boolean if a field has been set.
|
|
func (o *Task) HasExample() bool {
|
|
if o != nil && !IsNil(o.Example) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExample gets a reference to the given string and assigns it to the Example field.
|
|
func (o *Task) SetExample(v string) {
|
|
o.Example = &v
|
|
}
|
|
|
|
// GetGrade returns the Grade field value if set, zero value otherwise.
|
|
func (o *Task) GetGrade() string {
|
|
if o == nil || IsNil(o.Grade) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Grade
|
|
}
|
|
|
|
// GetGradeOk returns a tuple with the Grade field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetGradeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Grade) {
|
|
return nil, false
|
|
}
|
|
return o.Grade, true
|
|
}
|
|
|
|
// HasGrade returns a boolean if a field has been set.
|
|
func (o *Task) HasGrade() bool {
|
|
if o != nil && !IsNil(o.Grade) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetGrade gets a reference to the given string and assigns it to the Grade field.
|
|
func (o *Task) SetGrade(v string) {
|
|
o.Grade = &v
|
|
}
|
|
|
|
// GetLabels returns the Labels field value if set, zero value otherwise.
|
|
func (o *Task) GetLabels() []string {
|
|
if o == nil || IsNil(o.Labels) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Labels
|
|
}
|
|
|
|
// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetLabelsOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Labels) {
|
|
return nil, false
|
|
}
|
|
return o.Labels, true
|
|
}
|
|
|
|
// HasLabels returns a boolean if a field has been set.
|
|
func (o *Task) HasLabels() bool {
|
|
if o != nil && !IsNil(o.Labels) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLabels gets a reference to the given []string and assigns it to the Labels field.
|
|
func (o *Task) SetLabels(v []string) {
|
|
o.Labels = v
|
|
}
|
|
|
|
// GetLog returns the Log field value if set, zero value otherwise.
|
|
func (o *Task) GetLog() string {
|
|
if o == nil || IsNil(o.Log) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Log
|
|
}
|
|
|
|
// GetLogOk returns a tuple with the Log field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetLogOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Log) {
|
|
return nil, false
|
|
}
|
|
return o.Log, true
|
|
}
|
|
|
|
// HasLog returns a boolean if a field has been set.
|
|
func (o *Task) HasLog() bool {
|
|
if o != nil && !IsNil(o.Log) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLog gets a reference to the given string and assigns it to the Log field.
|
|
func (o *Task) SetLog(v string) {
|
|
o.Log = &v
|
|
}
|
|
|
|
// GetName returns the Name field value if set, zero value otherwise.
|
|
func (o *Task) GetName() string {
|
|
if o == nil || IsNil(o.Name) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Name
|
|
}
|
|
|
|
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Name) {
|
|
return nil, false
|
|
}
|
|
return o.Name, true
|
|
}
|
|
|
|
// HasName returns a boolean if a field has been set.
|
|
func (o *Task) HasName() bool {
|
|
if o != nil && !IsNil(o.Name) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetName gets a reference to the given string and assigns it to the Name field.
|
|
func (o *Task) SetName(v string) {
|
|
o.Name = &v
|
|
}
|
|
|
|
// GetOwner returns the Owner field value if set, zero value otherwise.
|
|
func (o *Task) GetOwner() string {
|
|
if o == nil || IsNil(o.Owner) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Owner
|
|
}
|
|
|
|
// GetOwnerOk returns a tuple with the Owner field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetOwnerOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Owner) {
|
|
return nil, false
|
|
}
|
|
return o.Owner, true
|
|
}
|
|
|
|
// HasOwner returns a boolean if a field has been set.
|
|
func (o *Task) HasOwner() bool {
|
|
if o != nil && !IsNil(o.Owner) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetOwner gets a reference to the given string and assigns it to the Owner field.
|
|
func (o *Task) SetOwner(v string) {
|
|
o.Owner = &v
|
|
}
|
|
|
|
// GetPath returns the Path field value if set, zero value otherwise.
|
|
func (o *Task) GetPath() string {
|
|
if o == nil || IsNil(o.Path) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Path
|
|
}
|
|
|
|
// GetPathOk returns a tuple with the Path field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetPathOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Path) {
|
|
return nil, false
|
|
}
|
|
return o.Path, true
|
|
}
|
|
|
|
// HasPath returns a boolean if a field has been set.
|
|
func (o *Task) HasPath() bool {
|
|
if o != nil && !IsNil(o.Path) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPath gets a reference to the given string and assigns it to the Path field.
|
|
func (o *Task) SetPath(v string) {
|
|
o.Path = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *Task) GetProvider() string {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Provider, true
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *Task) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *Task) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetResult returns the Result field value if set, zero value otherwise.
|
|
func (o *Task) GetResult() string {
|
|
if o == nil || IsNil(o.Result) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Result
|
|
}
|
|
|
|
// GetResultOk returns a tuple with the Result field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetResultOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Result) {
|
|
return nil, false
|
|
}
|
|
return o.Result, true
|
|
}
|
|
|
|
// HasResult returns a boolean if a field has been set.
|
|
func (o *Task) HasResult() bool {
|
|
if o != nil && !IsNil(o.Result) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetResult gets a reference to the given string and assigns it to the Result field.
|
|
func (o *Task) SetResult(v string) {
|
|
o.Result = &v
|
|
}
|
|
|
|
// GetScale returns the Scale field value if set, zero value otherwise.
|
|
func (o *Task) GetScale() string {
|
|
if o == nil || IsNil(o.Scale) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Scale
|
|
}
|
|
|
|
// GetScaleOk returns a tuple with the Scale field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetScaleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Scale) {
|
|
return nil, false
|
|
}
|
|
return o.Scale, true
|
|
}
|
|
|
|
// HasScale returns a boolean if a field has been set.
|
|
func (o *Task) HasScale() bool {
|
|
if o != nil && !IsNil(o.Scale) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScale gets a reference to the given string and assigns it to the Scale field.
|
|
func (o *Task) SetScale(v string) {
|
|
o.Scale = &v
|
|
}
|
|
|
|
// GetScore returns the Score field value if set, zero value otherwise.
|
|
func (o *Task) GetScore() float32 {
|
|
if o == nil || IsNil(o.Score) {
|
|
var ret float32
|
|
return ret
|
|
}
|
|
return *o.Score
|
|
}
|
|
|
|
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetScoreOk() (*float32, bool) {
|
|
if o == nil || IsNil(o.Score) {
|
|
return nil, false
|
|
}
|
|
return o.Score, true
|
|
}
|
|
|
|
// HasScore returns a boolean if a field has been set.
|
|
func (o *Task) HasScore() bool {
|
|
if o != nil && !IsNil(o.Score) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetScore gets a reference to the given float32 and assigns it to the Score field.
|
|
func (o *Task) SetScore(v float32) {
|
|
o.Score = &v
|
|
}
|
|
|
|
// GetSubject returns the Subject field value if set, zero value otherwise.
|
|
func (o *Task) GetSubject() string {
|
|
if o == nil || IsNil(o.Subject) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Subject
|
|
}
|
|
|
|
// GetSubjectOk returns a tuple with the Subject field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetSubjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Subject) {
|
|
return nil, false
|
|
}
|
|
return o.Subject, true
|
|
}
|
|
|
|
// HasSubject returns a boolean if a field has been set.
|
|
func (o *Task) HasSubject() bool {
|
|
if o != nil && !IsNil(o.Subject) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSubject gets a reference to the given string and assigns it to the Subject field.
|
|
func (o *Task) SetSubject(v string) {
|
|
o.Subject = &v
|
|
}
|
|
|
|
// GetTopic returns the Topic field value if set, zero value otherwise.
|
|
func (o *Task) GetTopic() string {
|
|
if o == nil || IsNil(o.Topic) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Topic
|
|
}
|
|
|
|
// GetTopicOk returns a tuple with the Topic field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetTopicOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Topic) {
|
|
return nil, false
|
|
}
|
|
return o.Topic, true
|
|
}
|
|
|
|
// HasTopic returns a boolean if a field has been set.
|
|
func (o *Task) HasTopic() bool {
|
|
if o != nil && !IsNil(o.Topic) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTopic gets a reference to the given string and assigns it to the Topic field.
|
|
func (o *Task) SetTopic(v string) {
|
|
o.Topic = &v
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *Task) GetType() string {
|
|
if o == nil || IsNil(o.Type) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Type
|
|
}
|
|
|
|
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *Task) GetTypeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Type) {
|
|
return nil, false
|
|
}
|
|
return o.Type, true
|
|
}
|
|
|
|
// HasType returns a boolean if a field has been set.
|
|
func (o *Task) HasType() bool {
|
|
if o != nil && !IsNil(o.Type) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetType gets a reference to the given string and assigns it to the Type field.
|
|
func (o *Task) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
func (o Task) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o Task) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Activity) {
|
|
toSerialize["activity"] = o.Activity
|
|
}
|
|
if !IsNil(o.CreatedTime) {
|
|
toSerialize["createdTime"] = o.CreatedTime
|
|
}
|
|
if !IsNil(o.DisplayName) {
|
|
toSerialize["displayName"] = o.DisplayName
|
|
}
|
|
if !IsNil(o.DocumentText) {
|
|
toSerialize["documentText"] = o.DocumentText
|
|
}
|
|
if !IsNil(o.DocumentUrl) {
|
|
toSerialize["documentUrl"] = o.DocumentUrl
|
|
}
|
|
if !IsNil(o.Example) {
|
|
toSerialize["example"] = o.Example
|
|
}
|
|
if !IsNil(o.Grade) {
|
|
toSerialize["grade"] = o.Grade
|
|
}
|
|
if !IsNil(o.Labels) {
|
|
toSerialize["labels"] = o.Labels
|
|
}
|
|
if !IsNil(o.Log) {
|
|
toSerialize["log"] = o.Log
|
|
}
|
|
if !IsNil(o.Name) {
|
|
toSerialize["name"] = o.Name
|
|
}
|
|
if !IsNil(o.Owner) {
|
|
toSerialize["owner"] = o.Owner
|
|
}
|
|
if !IsNil(o.Path) {
|
|
toSerialize["path"] = o.Path
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.Result) {
|
|
toSerialize["result"] = o.Result
|
|
}
|
|
if !IsNil(o.Scale) {
|
|
toSerialize["scale"] = o.Scale
|
|
}
|
|
if !IsNil(o.Score) {
|
|
toSerialize["score"] = o.Score
|
|
}
|
|
if !IsNil(o.Subject) {
|
|
toSerialize["subject"] = o.Subject
|
|
}
|
|
if !IsNil(o.Topic) {
|
|
toSerialize["topic"] = o.Topic
|
|
}
|
|
if !IsNil(o.Type) {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *Task) UnmarshalJSON(data []byte) (err error) {
|
|
varTask := _Task{}
|
|
|
|
err = json.Unmarshal(data, &varTask)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = Task(varTask)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "activity")
|
|
delete(additionalProperties, "createdTime")
|
|
delete(additionalProperties, "displayName")
|
|
delete(additionalProperties, "documentText")
|
|
delete(additionalProperties, "documentUrl")
|
|
delete(additionalProperties, "example")
|
|
delete(additionalProperties, "grade")
|
|
delete(additionalProperties, "labels")
|
|
delete(additionalProperties, "log")
|
|
delete(additionalProperties, "name")
|
|
delete(additionalProperties, "owner")
|
|
delete(additionalProperties, "path")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "result")
|
|
delete(additionalProperties, "scale")
|
|
delete(additionalProperties, "score")
|
|
delete(additionalProperties, "subject")
|
|
delete(additionalProperties, "topic")
|
|
delete(additionalProperties, "type")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTask struct {
|
|
value *Task
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTask) Get() *Task {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTask) Set(val *Task) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTask) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTask) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTask(val *Task) *NullableTask {
|
|
return &NullableTask{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTask) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTask) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|