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 SyncEndpointView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &SyncEndpointView{}
|
|
|
|
// SyncEndpointView struct for SyncEndpointView
|
|
type SyncEndpointView struct {
|
|
// Connector names a connected account from the org's connector registry, when the endpoint reaches its provider through one. Absent means the locator stands on its own; the pair below is always sufficient either way.
|
|
Connector *string `json:"connector,omitempty"`
|
|
// Locator addresses the thing INSIDE that provider, in the provider's own terms — an https clone URL for a hosted forge, a bare repository name for hanzo-git. It never carries a credential.
|
|
Locator *string `json:"locator,omitempty"`
|
|
// Provider is the concrete integration: \"github\", \"gitlab\" or \"hanzo-git\".
|
|
Provider *string `json:"provider,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _SyncEndpointView SyncEndpointView
|
|
|
|
// NewSyncEndpointView instantiates a new SyncEndpointView 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 NewSyncEndpointView() *SyncEndpointView {
|
|
this := SyncEndpointView{}
|
|
return &this
|
|
}
|
|
|
|
// NewSyncEndpointViewWithDefaults instantiates a new SyncEndpointView 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 NewSyncEndpointViewWithDefaults() *SyncEndpointView {
|
|
this := SyncEndpointView{}
|
|
return &this
|
|
}
|
|
|
|
// GetConnector returns the Connector field value if set, zero value otherwise.
|
|
func (o *SyncEndpointView) GetConnector() string {
|
|
if o == nil || IsNil(o.Connector) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Connector
|
|
}
|
|
|
|
// GetConnectorOk returns a tuple with the Connector field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncEndpointView) GetConnectorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Connector) {
|
|
return nil, false
|
|
}
|
|
return o.Connector, true
|
|
}
|
|
|
|
// HasConnector returns a boolean if a field has been set.
|
|
func (o *SyncEndpointView) HasConnector() bool {
|
|
if o != nil && !IsNil(o.Connector) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConnector gets a reference to the given string and assigns it to the Connector field.
|
|
func (o *SyncEndpointView) SetConnector(v string) {
|
|
o.Connector = &v
|
|
}
|
|
|
|
// GetLocator returns the Locator field value if set, zero value otherwise.
|
|
func (o *SyncEndpointView) GetLocator() string {
|
|
if o == nil || IsNil(o.Locator) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Locator
|
|
}
|
|
|
|
// GetLocatorOk returns a tuple with the Locator field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncEndpointView) GetLocatorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Locator) {
|
|
return nil, false
|
|
}
|
|
return o.Locator, true
|
|
}
|
|
|
|
// HasLocator returns a boolean if a field has been set.
|
|
func (o *SyncEndpointView) HasLocator() bool {
|
|
if o != nil && !IsNil(o.Locator) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLocator gets a reference to the given string and assigns it to the Locator field.
|
|
func (o *SyncEndpointView) SetLocator(v string) {
|
|
o.Locator = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *SyncEndpointView) GetProvider() string {
|
|
if o == nil || IsNil(o.Provider) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Provider
|
|
}
|
|
|
|
// GetProviderOk returns a tuple with the Provider field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *SyncEndpointView) GetProviderOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Provider) {
|
|
return nil, false
|
|
}
|
|
return o.Provider, true
|
|
}
|
|
|
|
// HasProvider returns a boolean if a field has been set.
|
|
func (o *SyncEndpointView) HasProvider() bool {
|
|
if o != nil && !IsNil(o.Provider) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetProvider gets a reference to the given string and assigns it to the Provider field.
|
|
func (o *SyncEndpointView) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
func (o SyncEndpointView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o SyncEndpointView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Connector) {
|
|
toSerialize["connector"] = o.Connector
|
|
}
|
|
if !IsNil(o.Locator) {
|
|
toSerialize["locator"] = o.Locator
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *SyncEndpointView) UnmarshalJSON(data []byte) (err error) {
|
|
varSyncEndpointView := _SyncEndpointView{}
|
|
|
|
err = json.Unmarshal(data, &varSyncEndpointView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = SyncEndpointView(varSyncEndpointView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "connector")
|
|
delete(additionalProperties, "locator")
|
|
delete(additionalProperties, "provider")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableSyncEndpointView struct {
|
|
value *SyncEndpointView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableSyncEndpointView) Get() *SyncEndpointView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableSyncEndpointView) Set(val *SyncEndpointView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableSyncEndpointView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableSyncEndpointView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableSyncEndpointView(val *SyncEndpointView) *NullableSyncEndpointView {
|
|
return &NullableSyncEndpointView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableSyncEndpointView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableSyncEndpointView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|