mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
345 lines
9.8 KiB
Go
345 lines
9.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 ProviderGithubBackfillResult type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubBackfillResult{}
|
|
|
|
// ProviderGithubBackfillResult struct for ProviderGithubBackfillResult
|
|
type ProviderGithubBackfillResult struct {
|
|
// Created is how many native issues this pass created.
|
|
Created *int64 `json:"created,omitempty"`
|
|
// Failed is how many repos or issues errored; the pass continues past each.
|
|
Failed *int64 `json:"failed,omitempty"`
|
|
// Issues is how many upstream issues were seen.
|
|
Issues *int64 `json:"issues,omitempty"`
|
|
// Repos is how many granted repos were walked (archived/disabled are skipped).
|
|
Repos *int64 `json:"repos,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 _ProviderGithubBackfillResult ProviderGithubBackfillResult
|
|
|
|
// NewProviderGithubBackfillResult instantiates a new ProviderGithubBackfillResult 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 NewProviderGithubBackfillResult() *ProviderGithubBackfillResult {
|
|
this := ProviderGithubBackfillResult{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubBackfillResultWithDefaults instantiates a new ProviderGithubBackfillResult 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 NewProviderGithubBackfillResultWithDefaults() *ProviderGithubBackfillResult {
|
|
this := ProviderGithubBackfillResult{}
|
|
return &this
|
|
}
|
|
|
|
// GetCreated returns the Created field value if set, zero value otherwise.
|
|
func (o *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) SetCreated(v int64) {
|
|
o.Created = &v
|
|
}
|
|
|
|
// GetFailed returns the Failed field value if set, zero value otherwise.
|
|
func (o *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) SetFailed(v int64) {
|
|
o.Failed = &v
|
|
}
|
|
|
|
// GetIssues returns the Issues field value if set, zero value otherwise.
|
|
func (o *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) SetIssues(v int64) {
|
|
o.Issues = &v
|
|
}
|
|
|
|
// GetRepos returns the Repos field value if set, zero value otherwise.
|
|
func (o *ProviderGithubBackfillResult) GetRepos() int64 {
|
|
if o == nil || IsNil(o.Repos) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Repos
|
|
}
|
|
|
|
// GetReposOk returns a tuple with the Repos field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubBackfillResult) GetReposOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Repos) {
|
|
return nil, false
|
|
}
|
|
return o.Repos, true
|
|
}
|
|
|
|
// HasRepos returns a boolean if a field has been set.
|
|
func (o *ProviderGithubBackfillResult) HasRepos() bool {
|
|
if o != nil && !IsNil(o.Repos) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepos gets a reference to the given int64 and assigns it to the Repos field.
|
|
func (o *ProviderGithubBackfillResult) SetRepos(v int64) {
|
|
o.Repos = &v
|
|
}
|
|
|
|
// GetTruncated returns the Truncated field value if set, zero value otherwise.
|
|
func (o *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) SetTruncated(v bool) {
|
|
o.Truncated = &v
|
|
}
|
|
|
|
// GetUpdated returns the Updated field value if set, zero value otherwise.
|
|
func (o *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) 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 *ProviderGithubBackfillResult) SetUpdated(v int64) {
|
|
o.Updated = &v
|
|
}
|
|
|
|
func (o ProviderGithubBackfillResult) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubBackfillResult) 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.Repos) {
|
|
toSerialize["repos"] = o.Repos
|
|
}
|
|
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 *ProviderGithubBackfillResult) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubBackfillResult := _ProviderGithubBackfillResult{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubBackfillResult)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubBackfillResult(varProviderGithubBackfillResult)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "created")
|
|
delete(additionalProperties, "failed")
|
|
delete(additionalProperties, "issues")
|
|
delete(additionalProperties, "repos")
|
|
delete(additionalProperties, "truncated")
|
|
delete(additionalProperties, "updated")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubBackfillResult struct {
|
|
value *ProviderGithubBackfillResult
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubBackfillResult) Get() *ProviderGithubBackfillResult {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubBackfillResult) Set(val *ProviderGithubBackfillResult) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubBackfillResult) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubBackfillResult) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubBackfillResult(val *ProviderGithubBackfillResult) *NullableProviderGithubBackfillResult {
|
|
return &NullableProviderGithubBackfillResult{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubBackfillResult) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubBackfillResult) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|