mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.2 KiB
Go
345 lines
9.2 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 TaskNewIssue type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaskNewIssue{}
|
|
|
|
// TaskNewIssue struct for TaskNewIssue
|
|
type TaskNewIssue struct {
|
|
// Description becomes the issue body.
|
|
Description *string `json:"description,omitempty"`
|
|
// Key is the board — the repository name, from the path. `owner/name`, or `github.com/owner/name`, names a repository on GitHub that no board on the forge stands for.
|
|
Key *string `json:"key,omitempty"`
|
|
// Priority is one of none, urgent, high, medium or low.
|
|
Priority *string `json:"priority,omitempty"`
|
|
// Reply is the conversation the issue was asked for in. A chat turn writes its own thread here, over anything else (apps/agents replyto.go); it is not a value to choose. The issue is bound to it, and what happens to the issue next — comments, closing, who holds it, a pull request that closes it — is said there.
|
|
Reply *TaskReply `json:"reply,omitempty"`
|
|
// Status is the board column to open into: backlog, todo, in_progress, done or canceled. Empty opens into backlog.
|
|
Status *string `json:"status,omitempty"`
|
|
// Title is the one line the card is read by on the board. Blank or whitespace is refused — an untitled card cannot be told apart from any other.
|
|
Title *string `json:"title,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaskNewIssue TaskNewIssue
|
|
|
|
// NewTaskNewIssue instantiates a new TaskNewIssue 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 NewTaskNewIssue() *TaskNewIssue {
|
|
this := TaskNewIssue{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskNewIssueWithDefaults instantiates a new TaskNewIssue 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 NewTaskNewIssueWithDefaults() *TaskNewIssue {
|
|
this := TaskNewIssue{}
|
|
return &this
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) SetKey(v string) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetPriority returns the Priority field value if set, zero value otherwise.
|
|
func (o *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) SetPriority(v string) {
|
|
o.Priority = &v
|
|
}
|
|
|
|
// GetReply returns the Reply field value if set, zero value otherwise.
|
|
func (o *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) SetReply(v TaskReply) {
|
|
o.Reply = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetTitle returns the Title field value if set, zero value otherwise.
|
|
func (o *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) 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 *TaskNewIssue) SetTitle(v string) {
|
|
o.Title = &v
|
|
}
|
|
|
|
func (o TaskNewIssue) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaskNewIssue) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.Key) {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
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 *TaskNewIssue) UnmarshalJSON(data []byte) (err error) {
|
|
varTaskNewIssue := _TaskNewIssue{}
|
|
|
|
err = json.Unmarshal(data, &varTaskNewIssue)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaskNewIssue(varTaskNewIssue)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "key")
|
|
delete(additionalProperties, "priority")
|
|
delete(additionalProperties, "reply")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "title")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaskNewIssue struct {
|
|
value *TaskNewIssue
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaskNewIssue) Get() *TaskNewIssue {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaskNewIssue) Set(val *TaskNewIssue) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaskNewIssue) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaskNewIssue) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaskNewIssue(val *TaskNewIssue) *NullableTaskNewIssue {
|
|
return &NullableTaskNewIssue{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaskNewIssue) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaskNewIssue) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|