mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
231 lines
6.4 KiB
Go
231 lines
6.4 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 ProviderGithubImportOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubImportOut{}
|
|
|
|
// ProviderGithubImportOut struct for ProviderGithubImportOut
|
|
type ProviderGithubImportOut struct {
|
|
// Codebases are the names they take in the org's code workspace, in the same order: poll GET /v1/git/repos for each to appear.
|
|
Codebases []string `json:"codebases,omitempty"`
|
|
// Queued is how many repositories were handed to the background importer.
|
|
Queued *int64 `json:"queued,omitempty"`
|
|
// Repos names those repositories, in the installation's listing order.
|
|
Repos []string `json:"repos,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubImportOut ProviderGithubImportOut
|
|
|
|
// NewProviderGithubImportOut instantiates a new ProviderGithubImportOut 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 NewProviderGithubImportOut() *ProviderGithubImportOut {
|
|
this := ProviderGithubImportOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubImportOutWithDefaults instantiates a new ProviderGithubImportOut 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 NewProviderGithubImportOutWithDefaults() *ProviderGithubImportOut {
|
|
this := ProviderGithubImportOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetCodebases returns the Codebases field value if set, zero value otherwise.
|
|
func (o *ProviderGithubImportOut) GetCodebases() []string {
|
|
if o == nil || IsNil(o.Codebases) {
|
|
var ret []string
|
|
return ret
|
|
}
|
|
return o.Codebases
|
|
}
|
|
|
|
// GetCodebasesOk returns a tuple with the Codebases field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubImportOut) GetCodebasesOk() ([]string, bool) {
|
|
if o == nil || IsNil(o.Codebases) {
|
|
return nil, false
|
|
}
|
|
return o.Codebases, true
|
|
}
|
|
|
|
// HasCodebases returns a boolean if a field has been set.
|
|
func (o *ProviderGithubImportOut) HasCodebases() bool {
|
|
if o != nil && !IsNil(o.Codebases) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCodebases gets a reference to the given []string and assigns it to the Codebases field.
|
|
func (o *ProviderGithubImportOut) SetCodebases(v []string) {
|
|
o.Codebases = v
|
|
}
|
|
|
|
// GetQueued returns the Queued field value if set, zero value otherwise.
|
|
func (o *ProviderGithubImportOut) GetQueued() int64 {
|
|
if o == nil || IsNil(o.Queued) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Queued
|
|
}
|
|
|
|
// GetQueuedOk returns a tuple with the Queued field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubImportOut) GetQueuedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Queued) {
|
|
return nil, false
|
|
}
|
|
return o.Queued, true
|
|
}
|
|
|
|
// HasQueued returns a boolean if a field has been set.
|
|
func (o *ProviderGithubImportOut) HasQueued() bool {
|
|
if o != nil && !IsNil(o.Queued) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetQueued gets a reference to the given int64 and assigns it to the Queued field.
|
|
func (o *ProviderGithubImportOut) SetQueued(v int64) {
|
|
o.Queued = &v
|
|
}
|
|
|
|
// GetRepos returns the Repos field value if set, zero value otherwise.
|
|
func (o *ProviderGithubImportOut) GetRepos() []string {
|
|
if o == nil || IsNil(o.Repos) {
|
|
var ret []string
|
|
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 *ProviderGithubImportOut) GetReposOk() ([]string, 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 *ProviderGithubImportOut) HasRepos() bool {
|
|
if o != nil && !IsNil(o.Repos) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetRepos gets a reference to the given []string and assigns it to the Repos field.
|
|
func (o *ProviderGithubImportOut) SetRepos(v []string) {
|
|
o.Repos = v
|
|
}
|
|
|
|
func (o ProviderGithubImportOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubImportOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Codebases) {
|
|
toSerialize["codebases"] = o.Codebases
|
|
}
|
|
if !IsNil(o.Queued) {
|
|
toSerialize["queued"] = o.Queued
|
|
}
|
|
if !IsNil(o.Repos) {
|
|
toSerialize["repos"] = o.Repos
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubImportOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubImportOut := _ProviderGithubImportOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubImportOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubImportOut(varProviderGithubImportOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "codebases")
|
|
delete(additionalProperties, "queued")
|
|
delete(additionalProperties, "repos")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubImportOut struct {
|
|
value *ProviderGithubImportOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubImportOut) Get() *ProviderGithubImportOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubImportOut) Set(val *ProviderGithubImportOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubImportOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubImportOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubImportOut(val *ProviderGithubImportOut) *NullableProviderGithubImportOut {
|
|
return &NullableProviderGithubImportOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubImportOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubImportOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|