mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
459 lines
13 KiB
Go
459 lines
13 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 TaskIssueEdit type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaskIssueEdit{}
|
|
|
|
// TaskIssueEdit struct for TaskIssueEdit
|
|
type TaskIssueEdit struct {
|
|
// Assignee hands the work to somebody — a person or an agent, by the name they are known by on the forge. \"\" TAKES IT OFF whoever holds it, which is why this is a pointer: absent leaves the holder alone. It is the other half of `claim`, which that handler already named: a claim takes work for the CALLER and refuses to name anyone else, because giving work away is a different act with different authority. This is that act, and until it existed a board could only be worked by whoever clicked first — an agent could never be given anything. `me` is you, by the GitHub account IAM links to you (or your forge login). `agent` hands the issue to the coding agent: it is labelled `agent`, and a coding run starts on its repository with the issue as the task, narrating in the thread the hand-off was asked in; its pull request closes the issue. Labelling an issue `agent` on GitHub does the same.
|
|
Assignee *string `json:"assignee,omitempty"`
|
|
// Comment is posted on the issue, after every other change — what a person in the issue's thread wants said on it.
|
|
Comment *string `json:"comment,omitempty"`
|
|
// Description rewrites the body.
|
|
Description *string `json:"description,omitempty"`
|
|
// Key is the board — the repository name, from the path.
|
|
Key *string `json:"key,omitempty"`
|
|
// Num is the issue number on that repository, from the path.
|
|
Num *int64 `json:"num,omitempty"`
|
|
// Priority re-prioritises it.
|
|
Priority *string `json:"priority,omitempty"`
|
|
// Reply is the conversation the edit was asked for in, written by a chat turn and never chosen (see newIssue). An issue bound to no thread is bound to this one, and a run the edit starts narrates here.
|
|
Reply *TaskReply `json:"reply,omitempty"`
|
|
// Status moves the card to another column.
|
|
Status *string `json:"status,omitempty"`
|
|
// Title renames the work item.
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaskIssueEdit TaskIssueEdit
|
|
|
|
// NewTaskIssueEdit instantiates a new TaskIssueEdit 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 NewTaskIssueEdit() *TaskIssueEdit {
|
|
this := TaskIssueEdit{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskIssueEditWithDefaults instantiates a new TaskIssueEdit 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 NewTaskIssueEditWithDefaults() *TaskIssueEdit {
|
|
this := TaskIssueEdit{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssignee returns the Assignee field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetAssignee() string {
|
|
if o == nil || IsNil(o.Assignee) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Assignee
|
|
}
|
|
|
|
// GetAssigneeOk returns a tuple with the Assignee field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetAssigneeOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Assignee) {
|
|
return nil, false
|
|
}
|
|
return o.Assignee, true
|
|
}
|
|
|
|
// HasAssignee returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasAssignee() bool {
|
|
if o != nil && !IsNil(o.Assignee) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAssignee gets a reference to the given string and assigns it to the Assignee field.
|
|
func (o *TaskIssueEdit) SetAssignee(v string) {
|
|
o.Assignee = &v
|
|
}
|
|
|
|
// GetComment returns the Comment field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetComment() string {
|
|
if o == nil || IsNil(o.Comment) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Comment
|
|
}
|
|
|
|
// GetCommentOk returns a tuple with the Comment field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetCommentOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Comment) {
|
|
return nil, false
|
|
}
|
|
return o.Comment, true
|
|
}
|
|
|
|
// HasComment returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasComment() bool {
|
|
if o != nil && !IsNil(o.Comment) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetComment gets a reference to the given string and assigns it to the Comment field.
|
|
func (o *TaskIssueEdit) SetComment(v string) {
|
|
o.Comment = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *TaskIssueEdit) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetKey() string {
|
|
if o == nil || IsNil(o.Key) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Key
|
|
}
|
|
|
|
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetKeyOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Key) {
|
|
return nil, false
|
|
}
|
|
return o.Key, true
|
|
}
|
|
|
|
// HasKey returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasKey() bool {
|
|
if o != nil && !IsNil(o.Key) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKey gets a reference to the given string and assigns it to the Key field.
|
|
func (o *TaskIssueEdit) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetNum returns the Num field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetNum() int64 {
|
|
if o == nil || IsNil(o.Num) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Num
|
|
}
|
|
|
|
// GetNumOk returns a tuple with the Num field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetNumOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Num) {
|
|
return nil, false
|
|
}
|
|
return o.Num, true
|
|
}
|
|
|
|
// HasNum returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasNum() bool {
|
|
if o != nil && !IsNil(o.Num) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNum gets a reference to the given int64 and assigns it to the Num field.
|
|
func (o *TaskIssueEdit) SetNum(v int64) {
|
|
o.Num = &v
|
|
}
|
|
|
|
// GetPriority returns the Priority field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetPriority() string {
|
|
if o == nil || IsNil(o.Priority) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Priority
|
|
}
|
|
|
|
// GetPriorityOk returns a tuple with the Priority field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetPriorityOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Priority) {
|
|
return nil, false
|
|
}
|
|
return o.Priority, true
|
|
}
|
|
|
|
// HasPriority returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasPriority() bool {
|
|
if o != nil && !IsNil(o.Priority) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPriority gets a reference to the given string and assigns it to the Priority field.
|
|
func (o *TaskIssueEdit) SetPriority(v string) {
|
|
o.Priority = &v
|
|
}
|
|
|
|
// GetReply returns the Reply field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetReply() TaskReply {
|
|
if o == nil || IsNil(o.Reply) {
|
|
var ret TaskReply
|
|
return ret
|
|
}
|
|
return *o.Reply
|
|
}
|
|
|
|
// GetReplyOk returns a tuple with the Reply field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetReplyOk() (*TaskReply, bool) {
|
|
if o == nil || IsNil(o.Reply) {
|
|
return nil, false
|
|
}
|
|
return o.Reply, true
|
|
}
|
|
|
|
// HasReply returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasReply() bool {
|
|
if o != nil && !IsNil(o.Reply) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetReply gets a reference to the given TaskReply and assigns it to the Reply field.
|
|
func (o *TaskIssueEdit) SetReply(v TaskReply) {
|
|
o.Reply = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *TaskIssueEdit) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TaskIssueEdit) GetTitle() string {
|
|
if o == nil || IsNil(o.Title) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Title
|
|
}
|
|
|
|
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueEdit) GetTitleOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Title) {
|
|
return nil, false
|
|
}
|
|
return o.Title, true
|
|
}
|
|
|
|
// HasTitle returns a boolean if a field has been set.
|
|
func (o *TaskIssueEdit) HasTitle() bool {
|
|
if o != nil && !IsNil(o.Title) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTitle gets a reference to the given string and assigns it to the Title field.
|
|
func (o *TaskIssueEdit) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o TaskIssueEdit) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaskIssueEdit) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assignee) {
|
|
toSerialize["assignee"] = o.Assignee
|
|
}
|
|
if !IsNil(o.Comment) {
|
|
toSerialize["comment"] = o.Comment
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if !IsNil(o.Num) {
|
|
toSerialize["num"] = o.Num
|
|
}
|
|
if !IsNil(o.Priority) {
|
|
toSerialize["priority"] = o.Priority
|
|
}
|
|
if !IsNil(o.Reply) {
|
|
toSerialize["reply"] = o.Reply
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaskIssueEdit) UnmarshalJSON(data []byte) (err error) {
|
|
varTaskIssueEdit := _TaskIssueEdit{}
|
|
|
|
err = json.Unmarshal(data, &varTaskIssueEdit)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaskIssueEdit(varTaskIssueEdit)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assignee")
|
|
delete(additionalProperties, "comment")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "num")
|
|
delete(additionalProperties, "priority")
|
|
delete(additionalProperties, "reply")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaskIssueEdit struct {
|
|
value *TaskIssueEdit
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaskIssueEdit) Get() *TaskIssueEdit {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaskIssueEdit) Set(val *TaskIssueEdit) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaskIssueEdit) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaskIssueEdit) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaskIssueEdit(val *TaskIssueEdit) *NullableTaskIssueEdit {
|
|
return &NullableTaskIssueEdit{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaskIssueEdit) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaskIssueEdit) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|