mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
535 lines
14 KiB
Go
535 lines
14 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 TaskIssueHit type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaskIssueHit{}
|
|
|
|
// TaskIssueHit struct for TaskIssueHit
|
|
type TaskIssueHit struct {
|
|
// Assignee is who holds the work. EMPTY MEANS UNHELD, which is what makes the issue claimable: claiming one already held by someone else is refused with 409 rather than quietly taken.
|
|
Assignee *string `json:"assignee,omitempty"`
|
|
// Channel is the collaboration channel the issue belongs to, spelled \"<space>_<channel>\" — empty when it is not channel-bound, which is most of them. It is here so an org-wide search says which channel each item came from without a second read.
|
|
Channel *string `json:"channel,omitempty"`
|
|
// Kind is what the row IS: issue, pr or epic.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// Number is the issue's number on that board, from 1 and monotonic there. Unique per board, never across the org — so it addresses an issue only together with Project.
|
|
Number *int64 `json:"number,omitempty"`
|
|
// Priority is urgent, high, medium, low or none. Never empty — an unset priority is the value \"none\".
|
|
Priority *string `json:"priority,omitempty"`
|
|
// Project is the board key the issue is on. It and Number are the issue's address in every other route on this surface, which is why a hit carries it.
|
|
Project *string `json:"project,omitempty"`
|
|
// Repo is the git repository the issue is bound to, empty when it is not repo-bound.
|
|
Repo *string `json:"repo,omitempty"`
|
|
// Source is which surface opened it: team, git, crm, helpdesk, cms or agent. \"git\" is how the mirrored forge and GitHub rows are spelled.
|
|
Source *string `json:"source,omitempty"`
|
|
// Status is the board column: backlog, todo, in_progress, done or canceled. Claiming moves backlog and todo to in_progress and leaves the other three where they are.
|
|
Status *string `json:"status,omitempty"`
|
|
// Title is the issue's one-line summary — what the q filter matched, along with the description.
|
|
Title *string `json:"title,omitempty"`
|
|
// URL is the row's external anchor — its extRef — which is a link only when the feeder sent one. A mirrored GitHub issue carries \"github:owner/repo#123\" and an agent's PR row carries the pushed branch. Empty for a row opened here.
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaskIssueHit TaskIssueHit
|
|
|
|
// NewTaskIssueHit instantiates a new TaskIssueHit 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 NewTaskIssueHit() *TaskIssueHit {
|
|
this := TaskIssueHit{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskIssueHitWithDefaults instantiates a new TaskIssueHit 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 NewTaskIssueHitWithDefaults() *TaskIssueHit {
|
|
this := TaskIssueHit{}
|
|
return &this
|
|
}
|
|
|
|
// GetAssignee returns the Assignee field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) SetAssignee(v string) {
|
|
o.Assignee = &v
|
|
}
|
|
|
|
// GetChannel returns the Channel field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetChannel() string {
|
|
if o == nil || IsNil(o.Channel) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Channel
|
|
}
|
|
|
|
// GetChannelOk returns a tuple with the Channel field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetChannelOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Channel) {
|
|
return nil, false
|
|
}
|
|
return o.Channel, true
|
|
}
|
|
|
|
// HasChannel returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasChannel() bool {
|
|
if o != nil && !IsNil(o.Channel) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetChannel gets a reference to the given string and assigns it to the Channel field.
|
|
func (o *TaskIssueHit) SetChannel(v string) {
|
|
o.Channel = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *TaskIssueHit) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetNumber returns the Number field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetNumber() int64 {
|
|
if o == nil || IsNil(o.Number) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Number
|
|
}
|
|
|
|
// GetNumberOk returns a tuple with the Number field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetNumberOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Number) {
|
|
return nil, false
|
|
}
|
|
return o.Number, true
|
|
}
|
|
|
|
// HasNumber returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasNumber() bool {
|
|
if o != nil && !IsNil(o.Number) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNumber gets a reference to the given int64 and assigns it to the Number field.
|
|
func (o *TaskIssueHit) SetNumber(v int64) {
|
|
o.Number = &v
|
|
}
|
|
|
|
// GetPriority returns the Priority field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) SetPriority(v string) {
|
|
o.Priority = &v
|
|
}
|
|
|
|
// GetProject returns the Project field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetProject() string {
|
|
if o == nil || IsNil(o.Project) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Project
|
|
}
|
|
|
|
// GetProjectOk returns a tuple with the Project field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetProjectOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Project) {
|
|
return nil, false
|
|
}
|
|
return o.Project, true
|
|
}
|
|
|
|
// HasProject returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasProject() bool {
|
|
if o != nil && !IsNil(o.Project) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProject gets a reference to the given string and assigns it to the Project field.
|
|
func (o *TaskIssueHit) SetProject(v string) {
|
|
o.Project = &v
|
|
}
|
|
|
|
// GetRepo returns the Repo field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetRepo() string {
|
|
if o == nil || IsNil(o.Repo) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Repo
|
|
}
|
|
|
|
// GetRepoOk returns a tuple with the Repo field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetRepoOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Repo) {
|
|
return nil, false
|
|
}
|
|
return o.Repo, true
|
|
}
|
|
|
|
// HasRepo returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasRepo() bool {
|
|
if o != nil && !IsNil(o.Repo) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepo gets a reference to the given string and assigns it to the Repo field.
|
|
func (o *TaskIssueHit) SetRepo(v string) {
|
|
o.Repo = &v
|
|
}
|
|
|
|
// GetSource returns the Source field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetSource() string {
|
|
if o == nil || IsNil(o.Source) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Source
|
|
}
|
|
|
|
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetSourceOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Source) {
|
|
return nil, false
|
|
}
|
|
return o.Source, true
|
|
}
|
|
|
|
// HasSource returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasSource() bool {
|
|
if o != nil && !IsNil(o.Source) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSource gets a reference to the given string and assigns it to the Source field.
|
|
func (o *TaskIssueHit) SetSource(v string) {
|
|
o.Source = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) 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 *TaskIssueHit) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *TaskIssueHit) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHit) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *TaskIssueHit) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *TaskIssueHit) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o TaskIssueHit) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaskIssueHit) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Assignee) {
|
|
toSerialize["assignee"] = o.Assignee
|
|
}
|
|
if !IsNil(o.Channel) {
|
|
toSerialize["channel"] = o.Channel
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.Number) {
|
|
toSerialize["number"] = o.Number
|
|
}
|
|
if !IsNil(o.Priority) {
|
|
toSerialize["priority"] = o.Priority
|
|
}
|
|
if !IsNil(o.Project) {
|
|
toSerialize["project"] = o.Project
|
|
}
|
|
if !IsNil(o.Repo) {
|
|
toSerialize["repo"] = o.Repo
|
|
}
|
|
if !IsNil(o.Source) {
|
|
toSerialize["source"] = o.Source
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Title) {
|
|
toSerialize["title"] = o.Title
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaskIssueHit) UnmarshalJSON(data []byte) (err error) {
|
|
varTaskIssueHit := _TaskIssueHit{}
|
|
|
|
err = json.Unmarshal(data, &varTaskIssueHit)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaskIssueHit(varTaskIssueHit)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "assignee")
|
|
delete(additionalProperties, "channel")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "number")
|
|
delete(additionalProperties, "priority")
|
|
delete(additionalProperties, "project")
|
|
delete(additionalProperties, "repo")
|
|
delete(additionalProperties, "source")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "title")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaskIssueHit struct {
|
|
value *TaskIssueHit
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaskIssueHit) Get() *TaskIssueHit {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaskIssueHit) Set(val *TaskIssueHit) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaskIssueHit) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaskIssueHit) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaskIssueHit(val *TaskIssueHit) *NullableTaskIssueHit {
|
|
return &NullableTaskIssueHit{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaskIssueHit) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaskIssueHit) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|