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 KnowledgeConnectorView type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgeConnectorView{}
|
|
|
|
// KnowledgeConnectorView struct for KnowledgeConnectorView
|
|
type KnowledgeConnectorView struct {
|
|
// Account names the connected external account. Absent until the org connects.
|
|
Account *string `json:"account,omitempty"`
|
|
// Configured is true when this deployment holds OAuth credentials for the provider.
|
|
Configured *bool `json:"configured,omitempty"`
|
|
// DocCount is the live count of this provider's documents in the org's store.
|
|
DocCount *int64 `json:"docCount,omitempty"`
|
|
// Error is the last sync failure, if any. Absent until the org connects.
|
|
Error *string `json:"error,omitempty"`
|
|
// Kind is \"native\" for a first-party Go connector, \"provider\" for a long-tail one.
|
|
Kind *string `json:"kind,omitempty"`
|
|
// LastSync is when the last pull finished. Absent until the org connects.
|
|
LastSync *string `json:"lastSync,omitempty"`
|
|
// Provider is the connector's id.
|
|
Provider *string `json:"provider,omitempty"`
|
|
// Status is connected, disconnected, syncing or error.
|
|
Status *string `json:"status,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgeConnectorView KnowledgeConnectorView
|
|
|
|
// NewKnowledgeConnectorView instantiates a new KnowledgeConnectorView 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 NewKnowledgeConnectorView() *KnowledgeConnectorView {
|
|
this := KnowledgeConnectorView{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgeConnectorViewWithDefaults instantiates a new KnowledgeConnectorView 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 NewKnowledgeConnectorViewWithDefaults() *KnowledgeConnectorView {
|
|
this := KnowledgeConnectorView{}
|
|
return &this
|
|
}
|
|
|
|
// GetAccount returns the Account field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) GetAccount() string {
|
|
if o == nil || IsNil(o.Account) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Account
|
|
}
|
|
|
|
// GetAccountOk returns a tuple with the Account field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeConnectorView) GetAccountOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Account) {
|
|
return nil, false
|
|
}
|
|
return o.Account, true
|
|
}
|
|
|
|
// HasAccount returns a boolean if a field has been set.
|
|
func (o *KnowledgeConnectorView) HasAccount() bool {
|
|
if o != nil && !IsNil(o.Account) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetAccount gets a reference to the given string and assigns it to the Account field.
|
|
func (o *KnowledgeConnectorView) SetAccount(v string) {
|
|
o.Account = &v
|
|
}
|
|
|
|
// GetConfigured returns the Configured field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) GetConfigured() bool {
|
|
if o == nil || IsNil(o.Configured) {
|
|
var ret bool
|
|
return ret
|
|
}
|
|
return *o.Configured
|
|
}
|
|
|
|
// GetConfiguredOk returns a tuple with the Configured field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeConnectorView) GetConfiguredOk() (*bool, bool) {
|
|
if o == nil || IsNil(o.Configured) {
|
|
return nil, false
|
|
}
|
|
return o.Configured, true
|
|
}
|
|
|
|
// HasConfigured returns a boolean if a field has been set.
|
|
func (o *KnowledgeConnectorView) HasConfigured() bool {
|
|
if o != nil && !IsNil(o.Configured) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetConfigured gets a reference to the given bool and assigns it to the Configured field.
|
|
func (o *KnowledgeConnectorView) SetConfigured(v bool) {
|
|
o.Configured = &v
|
|
}
|
|
|
|
// GetDocCount returns the DocCount field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) GetDocCount() int64 {
|
|
if o == nil || IsNil(o.DocCount) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.DocCount
|
|
}
|
|
|
|
// GetDocCountOk returns a tuple with the DocCount field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeConnectorView) GetDocCountOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.DocCount) {
|
|
return nil, false
|
|
}
|
|
return o.DocCount, true
|
|
}
|
|
|
|
// HasDocCount returns a boolean if a field has been set.
|
|
func (o *KnowledgeConnectorView) HasDocCount() bool {
|
|
if o != nil && !IsNil(o.DocCount) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetDocCount gets a reference to the given int64 and assigns it to the DocCount field.
|
|
func (o *KnowledgeConnectorView) SetDocCount(v int64) {
|
|
o.DocCount = &v
|
|
}
|
|
|
|
// GetError returns the Error field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) GetError() string {
|
|
if o == nil || IsNil(o.Error) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Error
|
|
}
|
|
|
|
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeConnectorView) GetErrorOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Error) {
|
|
return nil, false
|
|
}
|
|
return o.Error, true
|
|
}
|
|
|
|
// HasError returns a boolean if a field has been set.
|
|
func (o *KnowledgeConnectorView) HasError() bool {
|
|
if o != nil && !IsNil(o.Error) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetError gets a reference to the given string and assigns it to the Error field.
|
|
func (o *KnowledgeConnectorView) SetError(v string) {
|
|
o.Error = &v
|
|
}
|
|
|
|
// GetKind returns the Kind field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) GetKind() string {
|
|
if o == nil || IsNil(o.Kind) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.Kind
|
|
}
|
|
|
|
// GetKindOk returns a tuple with the Kind field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeConnectorView) GetKindOk() (*string, bool) {
|
|
if o == nil || IsNil(o.Kind) {
|
|
return nil, false
|
|
}
|
|
return o.Kind, true
|
|
}
|
|
|
|
// HasKind returns a boolean if a field has been set.
|
|
func (o *KnowledgeConnectorView) HasKind() bool {
|
|
if o != nil && !IsNil(o.Kind) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKind gets a reference to the given string and assigns it to the Kind field.
|
|
func (o *KnowledgeConnectorView) SetKind(v string) {
|
|
o.Kind = &v
|
|
}
|
|
|
|
// GetLastSync returns the LastSync field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) GetLastSync() string {
|
|
if o == nil || IsNil(o.LastSync) {
|
|
var ret string
|
|
return ret
|
|
}
|
|
return *o.LastSync
|
|
}
|
|
|
|
// GetLastSyncOk returns a tuple with the LastSync field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeConnectorView) GetLastSyncOk() (*string, bool) {
|
|
if o == nil || IsNil(o.LastSync) {
|
|
return nil, false
|
|
}
|
|
return o.LastSync, true
|
|
}
|
|
|
|
// HasLastSync returns a boolean if a field has been set.
|
|
func (o *KnowledgeConnectorView) HasLastSync() bool {
|
|
if o != nil && !IsNil(o.LastSync) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetLastSync gets a reference to the given string and assigns it to the LastSync field.
|
|
func (o *KnowledgeConnectorView) SetLastSync(v string) {
|
|
o.LastSync = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) 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 *KnowledgeConnectorView) 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 *KnowledgeConnectorView) 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 *KnowledgeConnectorView) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
// GetStatus returns the Status field value if set, zero value otherwise.
|
|
func (o *KnowledgeConnectorView) 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 *KnowledgeConnectorView) 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 *KnowledgeConnectorView) 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 *KnowledgeConnectorView) SetStatus(v string) {
|
|
o.Status = &v
|
|
}
|
|
|
|
func (o KnowledgeConnectorView) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgeConnectorView) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Account) {
|
|
toSerialize["account"] = o.Account
|
|
}
|
|
if !IsNil(o.Configured) {
|
|
toSerialize["configured"] = o.Configured
|
|
}
|
|
if !IsNil(o.DocCount) {
|
|
toSerialize["docCount"] = o.DocCount
|
|
}
|
|
if !IsNil(o.Error) {
|
|
toSerialize["error"] = o.Error
|
|
}
|
|
if !IsNil(o.Kind) {
|
|
toSerialize["kind"] = o.Kind
|
|
}
|
|
if !IsNil(o.LastSync) {
|
|
toSerialize["lastSync"] = o.LastSync
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
if !IsNil(o.Status) {
|
|
toSerialize["status"] = o.Status
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgeConnectorView) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgeConnectorView := _KnowledgeConnectorView{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgeConnectorView)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgeConnectorView(varKnowledgeConnectorView)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "account")
|
|
delete(additionalProperties, "configured")
|
|
delete(additionalProperties, "docCount")
|
|
delete(additionalProperties, "error")
|
|
delete(additionalProperties, "kind")
|
|
delete(additionalProperties, "lastSync")
|
|
delete(additionalProperties, "provider")
|
|
delete(additionalProperties, "status")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgeConnectorView struct {
|
|
value *KnowledgeConnectorView
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgeConnectorView) Get() *KnowledgeConnectorView {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgeConnectorView) Set(val *KnowledgeConnectorView) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgeConnectorView) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgeConnectorView) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgeConnectorView(val *KnowledgeConnectorView) *NullableKnowledgeConnectorView {
|
|
return &NullableKnowledgeConnectorView{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgeConnectorView) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgeConnectorView) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|