mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
421 lines
12 KiB
Go
421 lines
12 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 ProviderGithubSearchHit type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubSearchHit{}
|
|
|
|
// ProviderGithubSearchHit struct for ProviderGithubSearchHit
|
|
type ProviderGithubSearchHit struct {
|
|
// CloneURL is the repository's https git remote.
|
|
CloneUrl *string `json:"clone_url,omitempty"`
|
|
// DefaultBranch is the branch a clone checks out.
|
|
DefaultBranch *string `json:"default_branch,omitempty"`
|
|
// Description is the blurb the repository's owner wrote. Empty when it has none.
|
|
Description *string `json:"description,omitempty"`
|
|
// FullName is the repository's \"owner/repo\" on GitHub. Finding it here does NOT make it forkable: githubFork takes a repo the org's installation was granted, and a hit from the public index usually is not one.
|
|
FullName *string `json:"full_name,omitempty"`
|
|
// HTMLURL is the repository's page on github.com.
|
|
HtmlUrl *string `json:"html_url,omitempty"`
|
|
// Language is the primary language GitHub detected from the file mix (\"Go\", \"TypeScript\"). Empty when GitHub attributes none.
|
|
Language *string `json:"language,omitempty"`
|
|
// Private is GitHub's visibility flag, passed through. This op reads the public index — the org's token only charges the rate limit to the installation — so it is false for everything a search can reach.
|
|
Private *bool `json:"private,omitempty"`
|
|
// Stars is GitHub's stargazers_count as the SEARCH INDEX held it when the query ran — a snapshot, not a live count off the repository.
|
|
Stars *int64 `json:"stars,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubSearchHit ProviderGithubSearchHit
|
|
|
|
// NewProviderGithubSearchHit instantiates a new ProviderGithubSearchHit 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 NewProviderGithubSearchHit() *ProviderGithubSearchHit {
|
|
this := ProviderGithubSearchHit{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubSearchHitWithDefaults instantiates a new ProviderGithubSearchHit 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 NewProviderGithubSearchHitWithDefaults() *ProviderGithubSearchHit {
|
|
this := ProviderGithubSearchHit{}
|
|
return &this
|
|
}
|
|
|
|
// GetCloneUrl returns the CloneUrl field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetCloneUrl() string {
|
|
if o == nil || IsNil(o.CloneUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.CloneUrl
|
|
}
|
|
|
|
// GetCloneUrlOk returns a tuple with the CloneUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetCloneUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.CloneUrl) {
|
|
return nil, false
|
|
}
|
|
return o.CloneUrl, true
|
|
}
|
|
|
|
// HasCloneUrl returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasCloneUrl() bool {
|
|
if o != nil && !IsNil(o.CloneUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetCloneUrl gets a reference to the given string and assigns it to the CloneUrl field.
|
|
func (o *ProviderGithubSearchHit) SetCloneUrl(v string) {
|
|
o.CloneUrl = &v
|
|
}
|
|
|
|
// GetDefaultBranch returns the DefaultBranch field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetDefaultBranch() string {
|
|
if o == nil || IsNil(o.DefaultBranch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.DefaultBranch
|
|
}
|
|
|
|
// GetDefaultBranchOk returns a tuple with the DefaultBranch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetDefaultBranchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.DefaultBranch) {
|
|
return nil, false
|
|
}
|
|
return o.DefaultBranch, true
|
|
}
|
|
|
|
// HasDefaultBranch returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasDefaultBranch() bool {
|
|
if o != nil && !IsNil(o.DefaultBranch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDefaultBranch gets a reference to the given string and assigns it to the DefaultBranch field.
|
|
func (o *ProviderGithubSearchHit) SetDefaultBranch(v string) {
|
|
o.DefaultBranch = &v
|
|
}
|
|
|
|
// GetDescription returns the Description field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetDescription() string {
|
|
if o == nil || IsNil(o.Description) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Description
|
|
}
|
|
|
|
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetDescriptionOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Description) {
|
|
return nil, false
|
|
}
|
|
return o.Description, true
|
|
}
|
|
|
|
// HasDescription returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasDescription() bool {
|
|
if o != nil && !IsNil(o.Description) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDescription gets a reference to the given string and assigns it to the Description field.
|
|
func (o *ProviderGithubSearchHit) SetDescription(v string) {
|
|
o.Description = &v
|
|
}
|
|
|
|
// GetFullName returns the FullName field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetFullName() string {
|
|
if o == nil || IsNil(o.FullName) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.FullName
|
|
}
|
|
|
|
// GetFullNameOk returns a tuple with the FullName field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetFullNameOk() (*string, bool) {
|
|
if o == nil || IsNil(o.FullName) {
|
|
return nil, false
|
|
}
|
|
return o.FullName, true
|
|
}
|
|
|
|
// HasFullName returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasFullName() bool {
|
|
if o != nil && !IsNil(o.FullName) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetFullName gets a reference to the given string and assigns it to the FullName field.
|
|
func (o *ProviderGithubSearchHit) SetFullName(v string) {
|
|
o.FullName = &v
|
|
}
|
|
|
|
// GetHtmlUrl returns the HtmlUrl field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetHtmlUrl() string {
|
|
if o == nil || IsNil(o.HtmlUrl) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.HtmlUrl
|
|
}
|
|
|
|
// GetHtmlUrlOk returns a tuple with the HtmlUrl field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetHtmlUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.HtmlUrl) {
|
|
return nil, false
|
|
}
|
|
return o.HtmlUrl, true
|
|
}
|
|
|
|
// HasHtmlUrl returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasHtmlUrl() bool {
|
|
if o != nil && !IsNil(o.HtmlUrl) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetHtmlUrl gets a reference to the given string and assigns it to the HtmlUrl field.
|
|
func (o *ProviderGithubSearchHit) SetHtmlUrl(v string) {
|
|
o.HtmlUrl = &v
|
|
}
|
|
|
|
// GetLanguage returns the Language field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetLanguage() string {
|
|
if o == nil || IsNil(o.Language) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Language
|
|
}
|
|
|
|
// GetLanguageOk returns a tuple with the Language field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetLanguageOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Language) {
|
|
return nil, false
|
|
}
|
|
return o.Language, true
|
|
}
|
|
|
|
// HasLanguage returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasLanguage() bool {
|
|
if o != nil && !IsNil(o.Language) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLanguage gets a reference to the given string and assigns it to the Language field.
|
|
func (o *ProviderGithubSearchHit) SetLanguage(v string) {
|
|
o.Language = &v
|
|
}
|
|
|
|
// GetPrivate returns the Private field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetPrivate() bool {
|
|
if o == nil || IsNil(o.Private) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Private
|
|
}
|
|
|
|
// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetPrivateOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Private) {
|
|
return nil, false
|
|
}
|
|
return o.Private, true
|
|
}
|
|
|
|
// HasPrivate returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasPrivate() bool {
|
|
if o != nil && !IsNil(o.Private) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetPrivate gets a reference to the given bool and assigns it to the Private field.
|
|
func (o *ProviderGithubSearchHit) SetPrivate(v bool) {
|
|
o.Private = &v
|
|
}
|
|
|
|
// GetStars returns the Stars field value if set, zero value otherwise.
|
|
func (o *ProviderGithubSearchHit) GetStars() int64 {
|
|
if o == nil || IsNil(o.Stars) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Stars
|
|
}
|
|
|
|
// GetStarsOk returns a tuple with the Stars field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubSearchHit) GetStarsOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Stars) {
|
|
return nil, false
|
|
}
|
|
return o.Stars, true
|
|
}
|
|
|
|
// HasStars returns a boolean if a field has been set.
|
|
func (o *ProviderGithubSearchHit) HasStars() bool {
|
|
if o != nil && !IsNil(o.Stars) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStars gets a reference to the given int64 and assigns it to the Stars field.
|
|
func (o *ProviderGithubSearchHit) SetStars(v int64) {
|
|
o.Stars = &v
|
|
}
|
|
|
|
func (o ProviderGithubSearchHit) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubSearchHit) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.CloneUrl) {
|
|
toSerialize["clone_url"] = o.CloneUrl
|
|
}
|
|
if !IsNil(o.DefaultBranch) {
|
|
toSerialize["default_branch"] = o.DefaultBranch
|
|
}
|
|
if !IsNil(o.Description) {
|
|
toSerialize["description"] = o.Description
|
|
}
|
|
if !IsNil(o.FullName) {
|
|
toSerialize["full_name"] = o.FullName
|
|
}
|
|
if !IsNil(o.HtmlUrl) {
|
|
toSerialize["html_url"] = o.HtmlUrl
|
|
}
|
|
if !IsNil(o.Language) {
|
|
toSerialize["language"] = o.Language
|
|
}
|
|
if !IsNil(o.Private) {
|
|
toSerialize["private"] = o.Private
|
|
}
|
|
if !IsNil(o.Stars) {
|
|
toSerialize["stars"] = o.Stars
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubSearchHit) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubSearchHit := _ProviderGithubSearchHit{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubSearchHit)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubSearchHit(varProviderGithubSearchHit)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "clone_url")
|
|
delete(additionalProperties, "default_branch")
|
|
delete(additionalProperties, "description")
|
|
delete(additionalProperties, "full_name")
|
|
delete(additionalProperties, "html_url")
|
|
delete(additionalProperties, "language")
|
|
delete(additionalProperties, "private")
|
|
delete(additionalProperties, "stars")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubSearchHit struct {
|
|
value *ProviderGithubSearchHit
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubSearchHit) Get() *ProviderGithubSearchHit {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubSearchHit) Set(val *ProviderGithubSearchHit) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubSearchHit) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubSearchHit) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubSearchHit(val *ProviderGithubSearchHit) *NullableProviderGithubSearchHit {
|
|
return &NullableProviderGithubSearchHit{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubSearchHit) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubSearchHit) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|