Files
sdk/model_knowledge_catalog_entry.go

307 lines
9.2 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 KnowledgeCatalogEntry type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &KnowledgeCatalogEntry{}
// KnowledgeCatalogEntry struct for KnowledgeCatalogEntry
type KnowledgeCatalogEntry struct {
// Configured is whether THIS DEPLOYMENT holds the OAuth client credentials for the provider. False means Connect would dead-end, so the console can offer it disabled instead of broken. It is deployment-wide and says nothing about whether the caller's org has connected the source — that is the connector list's `status`.
Configured *bool `json:"configured,omitempty"`
// Description is one line of shop copy: what connecting this source pulls in. Native connectors carry written prose; a provider-backed one reads \"activepieces connector (<provider>)\".
Description *string `json:"description,omitempty"`
// DisplayName is the label to show a person. First-party connectors carry a written name (\"GitHub\", \"Google Drive\"); a provider-backed one falls back to the provider capitalized, because the rich activepieces metadata lives behind a cross-service call this read will not make.
DisplayName *string `json:"displayName,omitempty"`
// \"native\" | \"provider\"
Kind *string `json:"kind,omitempty"`
// Provider is the source's id and the address every connector op takes it by (/v1/knowledge/connectors/:provider). One of github, slack, google, notion.
Provider *string `json:"provider,omitempty"`
AdditionalProperties map[string]interface{}
}
type _KnowledgeCatalogEntry KnowledgeCatalogEntry
// NewKnowledgeCatalogEntry instantiates a new KnowledgeCatalogEntry 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 NewKnowledgeCatalogEntry() *KnowledgeCatalogEntry {
this := KnowledgeCatalogEntry{}
return &this
}
// NewKnowledgeCatalogEntryWithDefaults instantiates a new KnowledgeCatalogEntry 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 NewKnowledgeCatalogEntryWithDefaults() *KnowledgeCatalogEntry {
this := KnowledgeCatalogEntry{}
return &this
}
// GetConfigured returns the Configured field value if set, zero value otherwise.
func (o *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) SetConfigured(v bool) {
o.Configured = &v
}
// GetDescription returns the Description field value if set, zero value otherwise.
func (o *KnowledgeCatalogEntry) GetDescription() string {
if o == nil || IsNil(o.Description) {
var ret string
return ret
}
return *o.Description
}
// GetDescriptionOk returns a tuple with the Description field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KnowledgeCatalogEntry) GetDescriptionOk() (*string, bool) {
if o == nil || IsNil(o.Description) {
return nil, false
}
return o.Description, true
}
// HasDescription returns a boolean if a field has been set.
func (o *KnowledgeCatalogEntry) HasDescription() bool {
if o != nil && !IsNil(o.Description) {
return true
}
return false
}
// SetDescription gets a reference to the given string and assigns it to the Description field.
func (o *KnowledgeCatalogEntry) SetDescription(v string) {
o.Description = &v
}
// GetDisplayName returns the DisplayName field value if set, zero value otherwise.
func (o *KnowledgeCatalogEntry) GetDisplayName() string {
if o == nil || IsNil(o.DisplayName) {
var ret string
return ret
}
return *o.DisplayName
}
// GetDisplayNameOk returns a tuple with the DisplayName field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *KnowledgeCatalogEntry) GetDisplayNameOk() (*string, bool) {
if o == nil || IsNil(o.DisplayName) {
return nil, false
}
return o.DisplayName, true
}
// HasDisplayName returns a boolean if a field has been set.
func (o *KnowledgeCatalogEntry) HasDisplayName() bool {
if o != nil && !IsNil(o.DisplayName) {
return true
}
return false
}
// SetDisplayName gets a reference to the given string and assigns it to the DisplayName field.
func (o *KnowledgeCatalogEntry) SetDisplayName(v string) {
o.DisplayName = &v
}
// GetKind returns the Kind field value if set, zero value otherwise.
func (o *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) SetKind(v string) {
o.Kind = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) 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 *KnowledgeCatalogEntry) SetProvider(v string) {
o.Provider = &v
}
func (o KnowledgeCatalogEntry) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o KnowledgeCatalogEntry) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Configured) {
toSerialize["configured"] = o.Configured
}
if !IsNil(o.Description) {
toSerialize["description"] = o.Description
}
if !IsNil(o.DisplayName) {
toSerialize["displayName"] = o.DisplayName
}
if !IsNil(o.Kind) {
toSerialize["kind"] = o.Kind
}
if !IsNil(o.Provider) {
toSerialize["provider"] = o.Provider
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *KnowledgeCatalogEntry) UnmarshalJSON(data []byte) (err error) {
varKnowledgeCatalogEntry := _KnowledgeCatalogEntry{}
err = json.Unmarshal(data, &varKnowledgeCatalogEntry)
if err != nil {
return err
}
*o = KnowledgeCatalogEntry(varKnowledgeCatalogEntry)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "configured")
delete(additionalProperties, "description")
delete(additionalProperties, "displayName")
delete(additionalProperties, "kind")
delete(additionalProperties, "provider")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableKnowledgeCatalogEntry struct {
value *KnowledgeCatalogEntry
isSet bool
}
func (v NullableKnowledgeCatalogEntry) Get() *KnowledgeCatalogEntry {
return v.value
}
func (v *NullableKnowledgeCatalogEntry) Set(val *KnowledgeCatalogEntry) {
v.value = val
v.isSet = true
}
func (v NullableKnowledgeCatalogEntry) IsSet() bool {
return v.isSet
}
func (v *NullableKnowledgeCatalogEntry) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKnowledgeCatalogEntry(val *KnowledgeCatalogEntry) *NullableKnowledgeCatalogEntry {
return &NullableKnowledgeCatalogEntry{value: val, isSet: true}
}
func (v NullableKnowledgeCatalogEntry) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKnowledgeCatalogEntry) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}