Files
sdk/model_knowledge_connection_out.go

231 lines
6.3 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 KnowledgeConnectionOut type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &KnowledgeConnectionOut{}
// KnowledgeConnectionOut struct for KnowledgeConnectionOut
type KnowledgeConnectionOut struct {
// Account names the connected external account, when the provider reports one.
Account *string `json:"account,omitempty"`
// Provider is the connector this answer is about.
Provider *string `json:"provider,omitempty"`
// Status is the connection state: connected or disconnected.
Status *string `json:"status,omitempty"`
AdditionalProperties map[string]interface{}
}
type _KnowledgeConnectionOut KnowledgeConnectionOut
// NewKnowledgeConnectionOut instantiates a new KnowledgeConnectionOut 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 NewKnowledgeConnectionOut() *KnowledgeConnectionOut {
this := KnowledgeConnectionOut{}
return &this
}
// NewKnowledgeConnectionOutWithDefaults instantiates a new KnowledgeConnectionOut 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 NewKnowledgeConnectionOutWithDefaults() *KnowledgeConnectionOut {
this := KnowledgeConnectionOut{}
return &this
}
// GetAccount returns the Account field value if set, zero value otherwise.
func (o *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) SetAccount(v string) {
o.Account = &v
}
// GetProvider returns the Provider field value if set, zero value otherwise.
func (o *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) SetProvider(v string) {
o.Provider = &v
}
// GetStatus returns the Status field value if set, zero value otherwise.
func (o *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) 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 *KnowledgeConnectionOut) SetStatus(v string) {
o.Status = &v
}
func (o KnowledgeConnectionOut) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o KnowledgeConnectionOut) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Account) {
toSerialize["account"] = o.Account
}
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 *KnowledgeConnectionOut) UnmarshalJSON(data []byte) (err error) {
varKnowledgeConnectionOut := _KnowledgeConnectionOut{}
err = json.Unmarshal(data, &varKnowledgeConnectionOut)
if err != nil {
return err
}
*o = KnowledgeConnectionOut(varKnowledgeConnectionOut)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "account")
delete(additionalProperties, "provider")
delete(additionalProperties, "status")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableKnowledgeConnectionOut struct {
value *KnowledgeConnectionOut
isSet bool
}
func (v NullableKnowledgeConnectionOut) Get() *KnowledgeConnectionOut {
return v.value
}
func (v *NullableKnowledgeConnectionOut) Set(val *KnowledgeConnectionOut) {
v.value = val
v.isSet = true
}
func (v NullableKnowledgeConnectionOut) IsSet() bool {
return v.isSet
}
func (v *NullableKnowledgeConnectionOut) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableKnowledgeConnectionOut(val *KnowledgeConnectionOut) *NullableKnowledgeConnectionOut {
return &NullableKnowledgeConnectionOut{value: val, isSet: true}
}
func (v NullableKnowledgeConnectionOut) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableKnowledgeConnectionOut) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}