mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.6 KiB
Go
307 lines
8.6 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 ProviderGithubReposOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubReposOut{}
|
|
|
|
// ProviderGithubReposOut struct for ProviderGithubReposOut
|
|
type ProviderGithubReposOut struct {
|
|
// Connected is whether this answer is the caller's OWN GitHub. False with repositories is an org admin seeing the org's installations; false with none is the cue to connect.
|
|
Connected *bool `json:"connected,omitempty"`
|
|
// Next is the cursor for the page after this one; empty on the last page.
|
|
Next *string `json:"next,omitempty"`
|
|
// Repos is this page, most recently pushed first. Never null.
|
|
Repos []ProviderGithubRepoItem `json:"repos,omitempty"`
|
|
// Total is how many repositories match q and owner, across every page.
|
|
Total *int64 `json:"total,omitempty"`
|
|
// Unread names the installations that could not be read, so a short list is distinguishable from a complete one. Absent when the answer is whole.
|
|
Unread []string `json:"unread,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubReposOut ProviderGithubReposOut
|
|
|
|
// NewProviderGithubReposOut instantiates a new ProviderGithubReposOut 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 NewProviderGithubReposOut() *ProviderGithubReposOut {
|
|
this := ProviderGithubReposOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubReposOutWithDefaults instantiates a new ProviderGithubReposOut 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 NewProviderGithubReposOutWithDefaults() *ProviderGithubReposOut {
|
|
this := ProviderGithubReposOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetConnected returns the Connected field value if set, zero value otherwise.
|
|
func (o *ProviderGithubReposOut) GetConnected() bool {
|
|
if o == nil || IsNil(o.Connected) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Connected
|
|
}
|
|
|
|
// GetConnectedOk returns a tuple with the Connected field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubReposOut) GetConnectedOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Connected) {
|
|
return nil, false
|
|
}
|
|
return o.Connected, true
|
|
}
|
|
|
|
// HasConnected returns a boolean if a field has been set.
|
|
func (o *ProviderGithubReposOut) HasConnected() bool {
|
|
if o != nil && !IsNil(o.Connected) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConnected gets a reference to the given bool and assigns it to the Connected field.
|
|
func (o *ProviderGithubReposOut) SetConnected(v bool) {
|
|
o.Connected = &v
|
|
}
|
|
|
|
// GetNext returns the Next field value if set, zero value otherwise.
|
|
func (o *ProviderGithubReposOut) GetNext() string {
|
|
if o == nil || IsNil(o.Next) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Next
|
|
}
|
|
|
|
// GetNextOk returns a tuple with the Next field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubReposOut) GetNextOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Next) {
|
|
return nil, false
|
|
}
|
|
return o.Next, true
|
|
}
|
|
|
|
// HasNext returns a boolean if a field has been set.
|
|
func (o *ProviderGithubReposOut) HasNext() bool {
|
|
if o != nil && !IsNil(o.Next) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetNext gets a reference to the given string and assigns it to the Next field.
|
|
func (o *ProviderGithubReposOut) SetNext(v string) {
|
|
o.Next = &v
|
|
}
|
|
|
|
// GetRepos returns the Repos field value if set, zero value otherwise.
|
|
func (o *ProviderGithubReposOut) GetRepos() []ProviderGithubRepoItem {
|
|
if o == nil || IsNil(o.Repos) {
|
|
var ret []ProviderGithubRepoItem
|
|
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 *ProviderGithubReposOut) GetReposOk() ([]ProviderGithubRepoItem, 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 *ProviderGithubReposOut) HasRepos() bool {
|
|
if o != nil && !IsNil(o.Repos) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepos gets a reference to the given []ProviderGithubRepoItem and assigns it to the Repos field.
|
|
func (o *ProviderGithubReposOut) SetRepos(v []ProviderGithubRepoItem) {
|
|
o.Repos = v
|
|
}
|
|
|
|
// GetTotal returns the Total field value if set, zero value otherwise.
|
|
func (o *ProviderGithubReposOut) GetTotal() int64 {
|
|
if o == nil || IsNil(o.Total) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Total
|
|
}
|
|
|
|
// GetTotalOk returns a tuple with the Total field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubReposOut) GetTotalOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Total) {
|
|
return nil, false
|
|
}
|
|
return o.Total, true
|
|
}
|
|
|
|
// HasTotal returns a boolean if a field has been set.
|
|
func (o *ProviderGithubReposOut) HasTotal() bool {
|
|
if o != nil && !IsNil(o.Total) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetTotal gets a reference to the given int64 and assigns it to the Total field.
|
|
func (o *ProviderGithubReposOut) SetTotal(v int64) {
|
|
o.Total = &v
|
|
}
|
|
|
|
// GetUnread returns the Unread field value if set, zero value otherwise.
|
|
func (o *ProviderGithubReposOut) GetUnread() []string {
|
|
if o == nil || IsNil(o.Unread) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Unread
|
|
}
|
|
|
|
// GetUnreadOk returns a tuple with the Unread field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubReposOut) GetUnreadOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Unread) {
|
|
return nil, false
|
|
}
|
|
return o.Unread, true
|
|
}
|
|
|
|
// HasUnread returns a boolean if a field has been set.
|
|
func (o *ProviderGithubReposOut) HasUnread() bool {
|
|
if o != nil && !IsNil(o.Unread) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnread gets a reference to the given []string and assigns it to the Unread field.
|
|
func (o *ProviderGithubReposOut) SetUnread(v []string) {
|
|
o.Unread = v
|
|
}
|
|
|
|
func (o ProviderGithubReposOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubReposOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Connected) {
|
|
toSerialize["connected"] = o.Connected
|
|
}
|
|
if !IsNil(o.Next) {
|
|
toSerialize["next"] = o.Next
|
|
}
|
|
if !IsNil(o.Repos) {
|
|
toSerialize["repos"] = o.Repos
|
|
}
|
|
if !IsNil(o.Total) {
|
|
toSerialize["total"] = o.Total
|
|
}
|
|
if !IsNil(o.Unread) {
|
|
toSerialize["unread"] = o.Unread
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubReposOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubReposOut := _ProviderGithubReposOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubReposOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubReposOut(varProviderGithubReposOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "connected")
|
|
delete(additionalProperties, "next")
|
|
delete(additionalProperties, "repos")
|
|
delete(additionalProperties, "total")
|
|
delete(additionalProperties, "unread")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubReposOut struct {
|
|
value *ProviderGithubReposOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubReposOut) Get() *ProviderGithubReposOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubReposOut) Set(val *ProviderGithubReposOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubReposOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubReposOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubReposOut(val *ProviderGithubReposOut) *NullableProviderGithubReposOut {
|
|
return &NullableProviderGithubReposOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubReposOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubReposOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|