mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.1 KiB
Go
193 lines
5.1 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 TaskIssueHits type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &TaskIssueHits{}
|
|
|
|
// TaskIssueHits struct for TaskIssueHits
|
|
type TaskIssueHits struct {
|
|
// Count is how many rows Issues carries — the size of THIS answer after the cap, not how many issues matched. A count equal to the limit means there are probably more; there is no total and no cursor.
|
|
Count *int64 `json:"count,omitempty"`
|
|
// Issues are the matching rows grouped by status and oldest-first within a group, capped by the search's limit (50 by default, 200 at most). The cap is applied to that order, so a broad search returns the head of it rather than a sample.
|
|
Issues []TaskIssueHit `json:"issues,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _TaskIssueHits TaskIssueHits
|
|
|
|
// NewTaskIssueHits instantiates a new TaskIssueHits 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 NewTaskIssueHits() *TaskIssueHits {
|
|
this := TaskIssueHits{}
|
|
return &this
|
|
}
|
|
|
|
// NewTaskIssueHitsWithDefaults instantiates a new TaskIssueHits 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 NewTaskIssueHitsWithDefaults() *TaskIssueHits {
|
|
this := TaskIssueHits{}
|
|
return &this
|
|
}
|
|
|
|
// GetCount returns the Count field value if set, zero value otherwise.
|
|
func (o *TaskIssueHits) GetCount() int64 {
|
|
if o == nil || IsNil(o.Count) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Count
|
|
}
|
|
|
|
// GetCountOk returns a tuple with the Count field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHits) GetCountOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Count) {
|
|
return nil, false
|
|
}
|
|
return o.Count, true
|
|
}
|
|
|
|
// HasCount returns a boolean if a field has been set.
|
|
func (o *TaskIssueHits) HasCount() bool {
|
|
if o != nil && !IsNil(o.Count) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCount gets a reference to the given int64 and assigns it to the Count field.
|
|
func (o *TaskIssueHits) SetCount(v int64) {
|
|
o.Count = &v
|
|
}
|
|
|
|
// GetIssues returns the Issues field value if set, zero value otherwise.
|
|
func (o *TaskIssueHits) GetIssues() []TaskIssueHit {
|
|
if o == nil || IsNil(o.Issues) {
|
|
var ret []TaskIssueHit
|
|
return ret
|
|
}
|
|
return o.Issues
|
|
}
|
|
|
|
// GetIssuesOk returns a tuple with the Issues field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *TaskIssueHits) GetIssuesOk() ([]TaskIssueHit, bool) {
|
|
if o == nil || IsNil(o.Issues) {
|
|
return nil, false
|
|
}
|
|
return o.Issues, true
|
|
}
|
|
|
|
// HasIssues returns a boolean if a field has been set.
|
|
func (o *TaskIssueHits) HasIssues() bool {
|
|
if o != nil && !IsNil(o.Issues) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIssues gets a reference to the given []TaskIssueHit and assigns it to the Issues field.
|
|
func (o *TaskIssueHits) SetIssues(v []TaskIssueHit) {
|
|
o.Issues = v
|
|
}
|
|
|
|
func (o TaskIssueHits) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o TaskIssueHits) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Count) {
|
|
toSerialize["count"] = o.Count
|
|
}
|
|
if !IsNil(o.Issues) {
|
|
toSerialize["issues"] = o.Issues
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *TaskIssueHits) UnmarshalJSON(data []byte) (err error) {
|
|
varTaskIssueHits := _TaskIssueHits{}
|
|
|
|
err = json.Unmarshal(data, &varTaskIssueHits)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = TaskIssueHits(varTaskIssueHits)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "count")
|
|
delete(additionalProperties, "issues")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableTaskIssueHits struct {
|
|
value *TaskIssueHits
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableTaskIssueHits) Get() *TaskIssueHits {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableTaskIssueHits) Set(val *TaskIssueHits) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableTaskIssueHits) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableTaskIssueHits) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableTaskIssueHits(val *TaskIssueHits) *NullableTaskIssueHits {
|
|
return &NullableTaskIssueHits{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableTaskIssueHits) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableTaskIssueHits) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|