mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
307 lines
8.8 KiB
Go
307 lines
8.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 ProviderGithubForkOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &ProviderGithubForkOut{}
|
|
|
|
// ProviderGithubForkOut struct for ProviderGithubForkOut
|
|
type ProviderGithubForkOut struct {
|
|
// CloneURL is the fork's https git remote. GitHub populates a new fork in the background, so a clone issued the moment this answers can still find it empty.
|
|
CloneUrl *string `json:"clone_url,omitempty"`
|
|
// DefaultBranch is the branch the fork checks out, inherited from upstream.
|
|
DefaultBranch *string `json:"default_branch,omitempty"`
|
|
// Existing reports that the fork was already there. GitHub answers 202 either way, so without this a caller cannot tell \"made you one\" from \"you had one\".
|
|
Existing *bool `json:"existing,omitempty"`
|
|
// FullName is the fork's \"owner/repo\". The owner is the account it landed in — the request's org, or the installation's own account when none was named.
|
|
FullName *string `json:"full_name,omitempty"`
|
|
// HTMLURL is the fork's page on github.com.
|
|
HtmlUrl *string `json:"html_url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _ProviderGithubForkOut ProviderGithubForkOut
|
|
|
|
// NewProviderGithubForkOut instantiates a new ProviderGithubForkOut 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 NewProviderGithubForkOut() *ProviderGithubForkOut {
|
|
this := ProviderGithubForkOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewProviderGithubForkOutWithDefaults instantiates a new ProviderGithubForkOut 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 NewProviderGithubForkOutWithDefaults() *ProviderGithubForkOut {
|
|
this := ProviderGithubForkOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetCloneUrl returns the CloneUrl field value if set, zero value otherwise.
|
|
func (o *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) SetCloneUrl(v string) {
|
|
o.CloneUrl = &v
|
|
}
|
|
|
|
// GetDefaultBranch returns the DefaultBranch field value if set, zero value otherwise.
|
|
func (o *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) SetDefaultBranch(v string) {
|
|
o.DefaultBranch = &v
|
|
}
|
|
|
|
// GetExisting returns the Existing field value if set, zero value otherwise.
|
|
func (o *ProviderGithubForkOut) GetExisting() bool {
|
|
if o == nil || IsNil(o.Existing) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Existing
|
|
}
|
|
|
|
// GetExistingOk returns a tuple with the Existing field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *ProviderGithubForkOut) GetExistingOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Existing) {
|
|
return nil, false
|
|
}
|
|
return o.Existing, true
|
|
}
|
|
|
|
// HasExisting returns a boolean if a field has been set.
|
|
func (o *ProviderGithubForkOut) HasExisting() bool {
|
|
if o != nil && !IsNil(o.Existing) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetExisting gets a reference to the given bool and assigns it to the Existing field.
|
|
func (o *ProviderGithubForkOut) SetExisting(v bool) {
|
|
o.Existing = &v
|
|
}
|
|
|
|
// GetFullName returns the FullName field value if set, zero value otherwise.
|
|
func (o *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) SetFullName(v string) {
|
|
o.FullName = &v
|
|
}
|
|
|
|
// GetHtmlUrl returns the HtmlUrl field value if set, zero value otherwise.
|
|
func (o *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) 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 *ProviderGithubForkOut) SetHtmlUrl(v string) {
|
|
o.HtmlUrl = &v
|
|
}
|
|
|
|
func (o ProviderGithubForkOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o ProviderGithubForkOut) 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.Existing) {
|
|
toSerialize["existing"] = o.Existing
|
|
}
|
|
if !IsNil(o.FullName) {
|
|
toSerialize["full_name"] = o.FullName
|
|
}
|
|
if !IsNil(o.HtmlUrl) {
|
|
toSerialize["html_url"] = o.HtmlUrl
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *ProviderGithubForkOut) UnmarshalJSON(data []byte) (err error) {
|
|
varProviderGithubForkOut := _ProviderGithubForkOut{}
|
|
|
|
err = json.Unmarshal(data, &varProviderGithubForkOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = ProviderGithubForkOut(varProviderGithubForkOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "clone_url")
|
|
delete(additionalProperties, "default_branch")
|
|
delete(additionalProperties, "existing")
|
|
delete(additionalProperties, "full_name")
|
|
delete(additionalProperties, "html_url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableProviderGithubForkOut struct {
|
|
value *ProviderGithubForkOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableProviderGithubForkOut) Get() *ProviderGithubForkOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableProviderGithubForkOut) Set(val *ProviderGithubForkOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableProviderGithubForkOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableProviderGithubForkOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableProviderGithubForkOut(val *ProviderGithubForkOut) *NullableProviderGithubForkOut {
|
|
return &NullableProviderGithubForkOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableProviderGithubForkOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableProviderGithubForkOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|