mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
5.8 KiB
Go
231 lines
5.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 GitLinked type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &GitLinked{}
|
|
|
|
// GitLinked struct for GitLinked
|
|
type GitLinked struct {
|
|
// Held are the repositories that hold their own history here, which a link would hide.
|
|
Held []string `json:"held,omitempty"`
|
|
// Linked are the repositories it linked, each to its namesake on GitHub.
|
|
Linked []GitRepoView `json:"linked,omitempty"`
|
|
// Unmatched are the repositories it left as they were, each with what GitHub answered: no namesake readable as the caller is never replaced by a guess.
|
|
Unmatched []GitUnmatched `json:"unmatched,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _GitLinked GitLinked
|
|
|
|
// NewGitLinked instantiates a new GitLinked 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 NewGitLinked() *GitLinked {
|
|
this := GitLinked{}
|
|
return &this
|
|
}
|
|
|
|
// NewGitLinkedWithDefaults instantiates a new GitLinked 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 NewGitLinkedWithDefaults() *GitLinked {
|
|
this := GitLinked{}
|
|
return &this
|
|
}
|
|
|
|
// GetHeld returns the Held field value if set, zero value otherwise.
|
|
func (o *GitLinked) GetHeld() []string {
|
|
if o == nil || IsNil(o.Held) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Held
|
|
}
|
|
|
|
// GetHeldOk returns a tuple with the Held field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GitLinked) GetHeldOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Held) {
|
|
return nil, false
|
|
}
|
|
return o.Held, true
|
|
}
|
|
|
|
// HasHeld returns a boolean if a field has been set.
|
|
func (o *GitLinked) HasHeld() bool {
|
|
if o != nil && !IsNil(o.Held) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHeld gets a reference to the given []string and assigns it to the Held field.
|
|
func (o *GitLinked) SetHeld(v []string) {
|
|
o.Held = v
|
|
}
|
|
|
|
// GetLinked returns the Linked field value if set, zero value otherwise.
|
|
func (o *GitLinked) GetLinked() []GitRepoView {
|
|
if o == nil || IsNil(o.Linked) {
|
|
var ret []GitRepoView
|
|
return ret
|
|
}
|
|
return o.Linked
|
|
}
|
|
|
|
// GetLinkedOk returns a tuple with the Linked field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GitLinked) GetLinkedOk() ([]GitRepoView, bool) {
|
|
if o == nil || IsNil(o.Linked) {
|
|
return nil, false
|
|
}
|
|
return o.Linked, true
|
|
}
|
|
|
|
// HasLinked returns a boolean if a field has been set.
|
|
func (o *GitLinked) HasLinked() bool {
|
|
if o != nil && !IsNil(o.Linked) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLinked gets a reference to the given []GitRepoView and assigns it to the Linked field.
|
|
func (o *GitLinked) SetLinked(v []GitRepoView) {
|
|
o.Linked = v
|
|
}
|
|
|
|
// GetUnmatched returns the Unmatched field value if set, zero value otherwise.
|
|
func (o *GitLinked) GetUnmatched() []GitUnmatched {
|
|
if o == nil || IsNil(o.Unmatched) {
|
|
var ret []GitUnmatched
|
|
return ret
|
|
}
|
|
return o.Unmatched
|
|
}
|
|
|
|
// GetUnmatchedOk returns a tuple with the Unmatched field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *GitLinked) GetUnmatchedOk() ([]GitUnmatched, bool) {
|
|
if o == nil || IsNil(o.Unmatched) {
|
|
return nil, false
|
|
}
|
|
return o.Unmatched, true
|
|
}
|
|
|
|
// HasUnmatched returns a boolean if a field has been set.
|
|
func (o *GitLinked) HasUnmatched() bool {
|
|
if o != nil && !IsNil(o.Unmatched) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUnmatched gets a reference to the given []GitUnmatched and assigns it to the Unmatched field.
|
|
func (o *GitLinked) SetUnmatched(v []GitUnmatched) {
|
|
o.Unmatched = v
|
|
}
|
|
|
|
func (o GitLinked) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o GitLinked) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Held) {
|
|
toSerialize["held"] = o.Held
|
|
}
|
|
if !IsNil(o.Linked) {
|
|
toSerialize["linked"] = o.Linked
|
|
}
|
|
if !IsNil(o.Unmatched) {
|
|
toSerialize["unmatched"] = o.Unmatched
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *GitLinked) UnmarshalJSON(data []byte) (err error) {
|
|
varGitLinked := _GitLinked{}
|
|
|
|
err = json.Unmarshal(data, &varGitLinked)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = GitLinked(varGitLinked)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "held")
|
|
delete(additionalProperties, "linked")
|
|
delete(additionalProperties, "unmatched")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableGitLinked struct {
|
|
value *GitLinked
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableGitLinked) Get() *GitLinked {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableGitLinked) Set(val *GitLinked) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableGitLinked) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableGitLinked) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableGitLinked(val *GitLinked) *NullableGitLinked {
|
|
return &NullableGitLinked{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableGitLinked) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableGitLinked) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|