Files
sdk/model_provider_linear_backfill_result.go

307 lines
8.8 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 ProviderLinearBackfillResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &ProviderLinearBackfillResult{}
// ProviderLinearBackfillResult struct for ProviderLinearBackfillResult
type ProviderLinearBackfillResult struct {
// Created is how many native issues this pass created.
Created *int64 `json:"created,omitempty"`
// Failed is how many issues errored; the pass continues past each.
Failed *int64 `json:"failed,omitempty"`
// Issues is how many Linear issues were seen.
Issues *int64 `json:"issues,omitempty"`
// Truncated is set when the time budget or the issue cap stopped the pass early. Re-run to continue — the mirror is idempotent by ExtRef, so nothing duplicates.
Truncated *bool `json:"truncated,omitempty"`
// Updated is how many existing native issues this pass refreshed.
Updated *int64 `json:"updated,omitempty"`
AdditionalProperties map[string]interface{}
}
type _ProviderLinearBackfillResult ProviderLinearBackfillResult
// NewProviderLinearBackfillResult instantiates a new ProviderLinearBackfillResult 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 NewProviderLinearBackfillResult() *ProviderLinearBackfillResult {
this := ProviderLinearBackfillResult{}
return &this
}
// NewProviderLinearBackfillResultWithDefaults instantiates a new ProviderLinearBackfillResult 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 NewProviderLinearBackfillResultWithDefaults() *ProviderLinearBackfillResult {
this := ProviderLinearBackfillResult{}
return &this
}
// GetCreated returns the Created field value if set, zero value otherwise.
func (o *ProviderLinearBackfillResult) GetCreated() int64 {
if o == nil || IsNil(o.Created) {
var ret int64
return ret
}
return *o.Created
}
// GetCreatedOk returns a tuple with the Created field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderLinearBackfillResult) GetCreatedOk() (*int64, bool) {
if o == nil || IsNil(o.Created) {
return nil, false
}
return o.Created, true
}
// HasCreated returns a boolean if a field has been set.
func (o *ProviderLinearBackfillResult) HasCreated() bool {
if o != nil && !IsNil(o.Created) {
return true
}
return false
}
// SetCreated gets a reference to the given int64 and assigns it to the Created field.
func (o *ProviderLinearBackfillResult) SetCreated(v int64) {
o.Created = &v
}
// GetFailed returns the Failed field value if set, zero value otherwise.
func (o *ProviderLinearBackfillResult) GetFailed() int64 {
if o == nil || IsNil(o.Failed) {
var ret int64
return ret
}
return *o.Failed
}
// GetFailedOk returns a tuple with the Failed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderLinearBackfillResult) GetFailedOk() (*int64, bool) {
if o == nil || IsNil(o.Failed) {
return nil, false
}
return o.Failed, true
}
// HasFailed returns a boolean if a field has been set.
func (o *ProviderLinearBackfillResult) HasFailed() bool {
if o != nil && !IsNil(o.Failed) {
return true
}
return false
}
// SetFailed gets a reference to the given int64 and assigns it to the Failed field.
func (o *ProviderLinearBackfillResult) SetFailed(v int64) {
o.Failed = &v
}
// GetIssues returns the Issues field value if set, zero value otherwise.
func (o *ProviderLinearBackfillResult) GetIssues() int64 {
if o == nil || IsNil(o.Issues) {
var ret int64
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 *ProviderLinearBackfillResult) GetIssuesOk() (*int64, 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 *ProviderLinearBackfillResult) HasIssues() bool {
if o != nil && !IsNil(o.Issues) {
return true
}
return false
}
// SetIssues gets a reference to the given int64 and assigns it to the Issues field.
func (o *ProviderLinearBackfillResult) SetIssues(v int64) {
o.Issues = &v
}
// GetTruncated returns the Truncated field value if set, zero value otherwise.
func (o *ProviderLinearBackfillResult) GetTruncated() bool {
if o == nil || IsNil(o.Truncated) {
var ret bool
return ret
}
return *o.Truncated
}
// GetTruncatedOk returns a tuple with the Truncated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderLinearBackfillResult) GetTruncatedOk() (*bool, bool) {
if o == nil || IsNil(o.Truncated) {
return nil, false
}
return o.Truncated, true
}
// HasTruncated returns a boolean if a field has been set.
func (o *ProviderLinearBackfillResult) HasTruncated() bool {
if o != nil && !IsNil(o.Truncated) {
return true
}
return false
}
// SetTruncated gets a reference to the given bool and assigns it to the Truncated field.
func (o *ProviderLinearBackfillResult) SetTruncated(v bool) {
o.Truncated = &v
}
// GetUpdated returns the Updated field value if set, zero value otherwise.
func (o *ProviderLinearBackfillResult) GetUpdated() int64 {
if o == nil || IsNil(o.Updated) {
var ret int64
return ret
}
return *o.Updated
}
// GetUpdatedOk returns a tuple with the Updated field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *ProviderLinearBackfillResult) GetUpdatedOk() (*int64, bool) {
if o == nil || IsNil(o.Updated) {
return nil, false
}
return o.Updated, true
}
// HasUpdated returns a boolean if a field has been set.
func (o *ProviderLinearBackfillResult) HasUpdated() bool {
if o != nil && !IsNil(o.Updated) {
return true
}
return false
}
// SetUpdated gets a reference to the given int64 and assigns it to the Updated field.
func (o *ProviderLinearBackfillResult) SetUpdated(v int64) {
o.Updated = &v
}
func (o ProviderLinearBackfillResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o ProviderLinearBackfillResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Created) {
toSerialize["created"] = o.Created
}
if !IsNil(o.Failed) {
toSerialize["failed"] = o.Failed
}
if !IsNil(o.Issues) {
toSerialize["issues"] = o.Issues
}
if !IsNil(o.Truncated) {
toSerialize["truncated"] = o.Truncated
}
if !IsNil(o.Updated) {
toSerialize["updated"] = o.Updated
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *ProviderLinearBackfillResult) UnmarshalJSON(data []byte) (err error) {
varProviderLinearBackfillResult := _ProviderLinearBackfillResult{}
err = json.Unmarshal(data, &varProviderLinearBackfillResult)
if err != nil {
return err
}
*o = ProviderLinearBackfillResult(varProviderLinearBackfillResult)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "created")
delete(additionalProperties, "failed")
delete(additionalProperties, "issues")
delete(additionalProperties, "truncated")
delete(additionalProperties, "updated")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableProviderLinearBackfillResult struct {
value *ProviderLinearBackfillResult
isSet bool
}
func (v NullableProviderLinearBackfillResult) Get() *ProviderLinearBackfillResult {
return v.value
}
func (v *NullableProviderLinearBackfillResult) Set(val *ProviderLinearBackfillResult) {
v.value = val
v.isSet = true
}
func (v NullableProviderLinearBackfillResult) IsSet() bool {
return v.isSet
}
func (v *NullableProviderLinearBackfillResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableProviderLinearBackfillResult(val *ProviderLinearBackfillResult) *NullableProviderLinearBackfillResult {
return &NullableProviderLinearBackfillResult{value: val, isSet: true}
}
func (v NullableProviderLinearBackfillResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableProviderLinearBackfillResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}