mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
383 lines
10 KiB
Go
383 lines
10 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 SyncNativeView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SyncNativeView{}
|
|
|
|
// SyncNativeView struct for SyncNativeView
|
|
type SyncNativeView struct {
|
|
// AdvancedAt is when an import or a push last moved one of its refs, RFC3339 in UTC. Absent until one has.
|
|
AdvancedAt *string `json:"advancedAt,omitempty"`
|
|
// Branch is the forge's default branch, which an import sets to the upstream's once that branch has landed.
|
|
Branch *string `json:"branch,omitempty"`
|
|
// Clone is the https address to clone it from.
|
|
Clone *string `json:"clone,omitempty"`
|
|
// SizeBytes is the repository's size on the forge, in bytes.
|
|
SizeBytes *int64 `json:"sizeBytes,omitempty"`
|
|
// SSH is the ssh address to clone it from, when the forge serves one.
|
|
Ssh *string `json:"ssh,omitempty"`
|
|
// Status is one of \"synced\" (the forge holds it and no ref is in conflict), \"conflict\" (an upstream ref diverged and the forge kept its own history), \"pending\" (the forge does not hold it yet) or \"paused\" (the link's direction is off).
|
|
Status *string `json:"status,omitempty"`
|
|
// URL is the repository's page on the forge.
|
|
Url *string `json:"url,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SyncNativeView SyncNativeView
|
|
|
|
// NewSyncNativeView instantiates a new SyncNativeView 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 NewSyncNativeView() *SyncNativeView {
|
|
this := SyncNativeView{}
|
|
return &this
|
|
}
|
|
|
|
// NewSyncNativeViewWithDefaults instantiates a new SyncNativeView 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 NewSyncNativeViewWithDefaults() *SyncNativeView {
|
|
this := SyncNativeView{}
|
|
return &this
|
|
}
|
|
|
|
// GetAdvancedAt returns the AdvancedAt field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetAdvancedAt() string {
|
|
if o == nil || IsNil(o.AdvancedAt) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.AdvancedAt
|
|
}
|
|
|
|
// GetAdvancedAtOk returns a tuple with the AdvancedAt field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetAdvancedAtOk() (*string, bool) {
|
|
if o == nil || IsNil(o.AdvancedAt) {
|
|
return nil, false
|
|
}
|
|
return o.AdvancedAt, true
|
|
}
|
|
|
|
// HasAdvancedAt returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasAdvancedAt() bool {
|
|
if o != nil && !IsNil(o.AdvancedAt) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAdvancedAt gets a reference to the given string and assigns it to the AdvancedAt field.
|
|
func (o *SyncNativeView) SetAdvancedAt(v string) {
|
|
o.AdvancedAt = &v
|
|
}
|
|
|
|
// GetBranch returns the Branch field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetBranch() string {
|
|
if o == nil || IsNil(o.Branch) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Branch
|
|
}
|
|
|
|
// GetBranchOk returns a tuple with the Branch field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetBranchOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Branch) {
|
|
return nil, false
|
|
}
|
|
return o.Branch, true
|
|
}
|
|
|
|
// HasBranch returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasBranch() bool {
|
|
if o != nil && !IsNil(o.Branch) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetBranch gets a reference to the given string and assigns it to the Branch field.
|
|
func (o *SyncNativeView) SetBranch(v string) {
|
|
o.Branch = &v
|
|
}
|
|
|
|
// GetClone returns the Clone field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetClone() string {
|
|
if o == nil || IsNil(o.Clone) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Clone
|
|
}
|
|
|
|
// GetCloneOk returns a tuple with the Clone field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetCloneOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Clone) {
|
|
return nil, false
|
|
}
|
|
return o.Clone, true
|
|
}
|
|
|
|
// HasClone returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasClone() bool {
|
|
if o != nil && !IsNil(o.Clone) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetClone gets a reference to the given string and assigns it to the Clone field.
|
|
func (o *SyncNativeView) SetClone(v string) {
|
|
o.Clone = &v
|
|
}
|
|
|
|
// GetSizeBytes returns the SizeBytes field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetSizeBytes() int64 {
|
|
if o == nil || IsNil(o.SizeBytes) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.SizeBytes
|
|
}
|
|
|
|
// GetSizeBytesOk returns a tuple with the SizeBytes field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetSizeBytesOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.SizeBytes) {
|
|
return nil, false
|
|
}
|
|
return o.SizeBytes, true
|
|
}
|
|
|
|
// HasSizeBytes returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasSizeBytes() bool {
|
|
if o != nil && !IsNil(o.SizeBytes) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSizeBytes gets a reference to the given int64 and assigns it to the SizeBytes field.
|
|
func (o *SyncNativeView) SetSizeBytes(v int64) {
|
|
o.SizeBytes = &v
|
|
}
|
|
|
|
// GetSsh returns the Ssh field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetSsh() string {
|
|
if o == nil || IsNil(o.Ssh) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Ssh
|
|
}
|
|
|
|
// GetSshOk returns a tuple with the Ssh field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetSshOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Ssh) {
|
|
return nil, false
|
|
}
|
|
return o.Ssh, true
|
|
}
|
|
|
|
// HasSsh returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasSsh() bool {
|
|
if o != nil && !IsNil(o.Ssh) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetSsh gets a reference to the given string and assigns it to the Ssh field.
|
|
func (o *SyncNativeView) SetSsh(v string) {
|
|
o.Ssh = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetStatus() string {
|
|
if o == nil || IsNil(o.Status) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Status
|
|
}
|
|
|
|
// GetStatusOk returns a tuple with the Status field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetStatusOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Status) {
|
|
return nil, false
|
|
}
|
|
return o.Status, true
|
|
}
|
|
|
|
// HasStatus returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasStatus() bool {
|
|
if o != nil && !IsNil(o.Status) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetStatus gets a reference to the given string and assigns it to the Status field.
|
|
func (o *SyncNativeView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
// GetUrl returns the Url field value if set, zero value otherwise.
|
|
func (o *SyncNativeView) GetUrl() string {
|
|
if o == nil || IsNil(o.Url) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Url
|
|
}
|
|
|
|
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncNativeView) GetUrlOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Url) {
|
|
return nil, false
|
|
}
|
|
return o.Url, true
|
|
}
|
|
|
|
// HasUrl returns a boolean if a field has been set.
|
|
func (o *SyncNativeView) HasUrl() bool {
|
|
if o != nil && !IsNil(o.Url) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetUrl gets a reference to the given string and assigns it to the Url field.
|
|
func (o *SyncNativeView) SetUrl(v string) {
|
|
o.Url = &v
|
|
}
|
|
|
|
func (o SyncNativeView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SyncNativeView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.AdvancedAt) {
|
|
toSerialize["advancedAt"] = o.AdvancedAt
|
|
}
|
|
if !IsNil(o.Branch) {
|
|
toSerialize["branch"] = o.Branch
|
|
}
|
|
if !IsNil(o.Clone) {
|
|
toSerialize["clone"] = o.Clone
|
|
}
|
|
if !IsNil(o.SizeBytes) {
|
|
toSerialize["sizeBytes"] = o.SizeBytes
|
|
}
|
|
if !IsNil(o.Ssh) {
|
|
toSerialize["ssh"] = o.Ssh
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
if !IsNil(o.Url) {
|
|
toSerialize["url"] = o.Url
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SyncNativeView) UnmarshalJSON(data []byte) (err error) {
|
|
varSyncNativeView := _SyncNativeView{}
|
|
|
|
err = json.Unmarshal(data, &varSyncNativeView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SyncNativeView(varSyncNativeView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "advancedAt")
|
|
delete(additionalProperties, "branch")
|
|
delete(additionalProperties, "clone")
|
|
delete(additionalProperties, "sizeBytes")
|
|
delete(additionalProperties, "ssh")
|
|
delete(additionalProperties, "status")
|
|
delete(additionalProperties, "url")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSyncNativeView struct {
|
|
value *SyncNativeView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSyncNativeView) Get() *SyncNativeView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSyncNativeView) Set(val *SyncNativeView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSyncNativeView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSyncNativeView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSyncNativeView(val *SyncNativeView) *NullableSyncNativeView {
|
|
return &NullableSyncNativeView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSyncNativeView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSyncNativeView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|