mirror of
https://github.com/hanzo-go/sdk.git
synced 2026-11-20 20:13:42 +00:00
193 lines
5.1 KiB
Go
193 lines
5.1 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 KnowledgeKbSyncOut type satisfies the MappedNullable interface at compile time
|
|
var _ MappedNullable = &KnowledgeKbSyncOut{}
|
|
|
|
// KnowledgeKbSyncOut struct for KnowledgeKbSyncOut
|
|
type KnowledgeKbSyncOut struct {
|
|
// Ingested is how many documents landed in the org's knowledge store.
|
|
Ingested *int64 `json:"ingested,omitempty"`
|
|
// Provider is the connector that was pulled.
|
|
Provider *string `json:"provider,omitempty"`
|
|
AdditionalProperties map[string]interface{}
|
|
}
|
|
|
|
type _KnowledgeKbSyncOut KnowledgeKbSyncOut
|
|
|
|
// NewKnowledgeKbSyncOut instantiates a new KnowledgeKbSyncOut 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 NewKnowledgeKbSyncOut() *KnowledgeKbSyncOut {
|
|
this := KnowledgeKbSyncOut{}
|
|
return &this
|
|
}
|
|
|
|
// NewKnowledgeKbSyncOutWithDefaults instantiates a new KnowledgeKbSyncOut 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 NewKnowledgeKbSyncOutWithDefaults() *KnowledgeKbSyncOut {
|
|
this := KnowledgeKbSyncOut{}
|
|
return &this
|
|
}
|
|
|
|
// GetIngested returns the Ingested field value if set, zero value otherwise.
|
|
func (o *KnowledgeKbSyncOut) GetIngested() int64 {
|
|
if o == nil || IsNil(o.Ingested) {
|
|
var ret int64
|
|
return ret
|
|
}
|
|
return *o.Ingested
|
|
}
|
|
|
|
// GetIngestedOk returns a tuple with the Ingested field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *KnowledgeKbSyncOut) GetIngestedOk() (*int64, bool) {
|
|
if o == nil || IsNil(o.Ingested) {
|
|
return nil, false
|
|
}
|
|
return o.Ingested, true
|
|
}
|
|
|
|
// HasIngested returns a boolean if a field has been set.
|
|
func (o *KnowledgeKbSyncOut) HasIngested() bool {
|
|
if o != nil && !IsNil(o.Ingested) {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetIngested gets a reference to the given int64 and assigns it to the Ingested field.
|
|
func (o *KnowledgeKbSyncOut) SetIngested(v int64) {
|
|
o.Ingested = &v
|
|
}
|
|
|
|
// GetProvider returns the Provider field value if set, zero value otherwise.
|
|
func (o *KnowledgeKbSyncOut) 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 *KnowledgeKbSyncOut) 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 *KnowledgeKbSyncOut) 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 *KnowledgeKbSyncOut) SetProvider(v string) {
|
|
o.Provider = &v
|
|
}
|
|
|
|
func (o KnowledgeKbSyncOut) MarshalJSON() ([]byte, error) {
|
|
toSerialize, err := o.ToMap()
|
|
if err != nil {
|
|
return []byte{}, err
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
func (o KnowledgeKbSyncOut) ToMap() (map[string]interface{}, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if !IsNil(o.Ingested) {
|
|
toSerialize["ingested"] = o.Ingested
|
|
}
|
|
if !IsNil(o.Provider) {
|
|
toSerialize["provider"] = o.Provider
|
|
}
|
|
|
|
for key, value := range o.AdditionalProperties {
|
|
toSerialize[key] = value
|
|
}
|
|
|
|
return toSerialize, nil
|
|
}
|
|
|
|
func (o *KnowledgeKbSyncOut) UnmarshalJSON(data []byte) (err error) {
|
|
varKnowledgeKbSyncOut := _KnowledgeKbSyncOut{}
|
|
|
|
err = json.Unmarshal(data, &varKnowledgeKbSyncOut)
|
|
|
|
if err != nil {
|
|
return err
|
|
}
|
|
|
|
*o = KnowledgeKbSyncOut(varKnowledgeKbSyncOut)
|
|
|
|
additionalProperties := make(map[string]interface{})
|
|
|
|
if err = json.Unmarshal(data, &additionalProperties); err == nil {
|
|
delete(additionalProperties, "ingested")
|
|
delete(additionalProperties, "provider")
|
|
o.AdditionalProperties = additionalProperties
|
|
}
|
|
|
|
return err
|
|
}
|
|
|
|
type NullableKnowledgeKbSyncOut struct {
|
|
value *KnowledgeKbSyncOut
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableKnowledgeKbSyncOut) Get() *KnowledgeKbSyncOut {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableKnowledgeKbSyncOut) Set(val *KnowledgeKbSyncOut) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableKnowledgeKbSyncOut) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableKnowledgeKbSyncOut) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableKnowledgeKbSyncOut(val *KnowledgeKbSyncOut) *NullableKnowledgeKbSyncOut {
|
|
return &NullableKnowledgeKbSyncOut{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableKnowledgeKbSyncOut) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableKnowledgeKbSyncOut) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|