Files
sdk/model_doc_search_result.go

376 lines
9.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 DocSearchResult type satisfies the MappedNullable interface at compile time
var _ MappedNullable = &DocSearchResult{}
// DocSearchResult struct for DocSearchResult
type DocSearchResult struct {
Breadcrumbs []string `json:"breadcrumbs,omitempty"`
Content *string `json:"content,omitempty"`
FileId *string `json:"file_id,omitempty"`
Id *string `json:"id,omitempty"`
Title *string `json:"title,omitempty"`
Type *string `json:"type,omitempty"`
Url *string `json:"url,omitempty"`
AdditionalProperties map[string]interface{}
}
type _DocSearchResult DocSearchResult
// NewDocSearchResult instantiates a new DocSearchResult 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 NewDocSearchResult() *DocSearchResult {
this := DocSearchResult{}
return &this
}
// NewDocSearchResultWithDefaults instantiates a new DocSearchResult 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 NewDocSearchResultWithDefaults() *DocSearchResult {
this := DocSearchResult{}
return &this
}
// GetBreadcrumbs returns the Breadcrumbs field value if set, zero value otherwise.
func (o *DocSearchResult) GetBreadcrumbs() []string {
if o == nil || IsNil(o.Breadcrumbs) {
var ret []string
return ret
}
return o.Breadcrumbs
}
// GetBreadcrumbsOk returns a tuple with the Breadcrumbs field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetBreadcrumbsOk() ([]string, bool) {
if o == nil || IsNil(o.Breadcrumbs) {
return nil, false
}
return o.Breadcrumbs, true
}
// HasBreadcrumbs returns a boolean if a field has been set.
func (o *DocSearchResult) HasBreadcrumbs() bool {
if o != nil && !IsNil(o.Breadcrumbs) {
return true
}
return false
}
// SetBreadcrumbs gets a reference to the given []string and assigns it to the Breadcrumbs field.
func (o *DocSearchResult) SetBreadcrumbs(v []string) {
o.Breadcrumbs = v
}
// GetContent returns the Content field value if set, zero value otherwise.
func (o *DocSearchResult) GetContent() string {
if o == nil || IsNil(o.Content) {
var ret string
return ret
}
return *o.Content
}
// GetContentOk returns a tuple with the Content field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetContentOk() (*string, bool) {
if o == nil || IsNil(o.Content) {
return nil, false
}
return o.Content, true
}
// HasContent returns a boolean if a field has been set.
func (o *DocSearchResult) HasContent() bool {
if o != nil && !IsNil(o.Content) {
return true
}
return false
}
// SetContent gets a reference to the given string and assigns it to the Content field.
func (o *DocSearchResult) SetContent(v string) {
o.Content = &v
}
// GetFileId returns the FileId field value if set, zero value otherwise.
func (o *DocSearchResult) GetFileId() string {
if o == nil || IsNil(o.FileId) {
var ret string
return ret
}
return *o.FileId
}
// GetFileIdOk returns a tuple with the FileId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetFileIdOk() (*string, bool) {
if o == nil || IsNil(o.FileId) {
return nil, false
}
return o.FileId, true
}
// HasFileId returns a boolean if a field has been set.
func (o *DocSearchResult) HasFileId() bool {
if o != nil && !IsNil(o.FileId) {
return true
}
return false
}
// SetFileId gets a reference to the given string and assigns it to the FileId field.
func (o *DocSearchResult) SetFileId(v string) {
o.FileId = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *DocSearchResult) GetId() string {
if o == nil || IsNil(o.Id) {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetIdOk() (*string, bool) {
if o == nil || IsNil(o.Id) {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *DocSearchResult) HasId() bool {
if o != nil && !IsNil(o.Id) {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DocSearchResult) SetId(v string) {
o.Id = &v
}
// GetTitle returns the Title field value if set, zero value otherwise.
func (o *DocSearchResult) GetTitle() string {
if o == nil || IsNil(o.Title) {
var ret string
return ret
}
return *o.Title
}
// GetTitleOk returns a tuple with the Title field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetTitleOk() (*string, bool) {
if o == nil || IsNil(o.Title) {
return nil, false
}
return o.Title, true
}
// HasTitle returns a boolean if a field has been set.
func (o *DocSearchResult) HasTitle() bool {
if o != nil && !IsNil(o.Title) {
return true
}
return false
}
// SetTitle gets a reference to the given string and assigns it to the Title field.
func (o *DocSearchResult) SetTitle(v string) {
o.Title = &v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *DocSearchResult) GetType() string {
if o == nil || IsNil(o.Type) {
var ret string
return ret
}
return *o.Type
}
// GetTypeOk returns a tuple with the Type field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetTypeOk() (*string, bool) {
if o == nil || IsNil(o.Type) {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *DocSearchResult) HasType() bool {
if o != nil && !IsNil(o.Type) {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *DocSearchResult) SetType(v string) {
o.Type = &v
}
// GetUrl returns the Url field value if set, zero value otherwise.
func (o *DocSearchResult) GetUrl() string {
if o == nil || IsNil(o.Url) {
var ret string
return ret
}
return *o.Url
}
// GetUrlOk returns a tuple with the Url field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DocSearchResult) GetUrlOk() (*string, bool) {
if o == nil || IsNil(o.Url) {
return nil, false
}
return o.Url, true
}
// HasUrl returns a boolean if a field has been set.
func (o *DocSearchResult) HasUrl() bool {
if o != nil && !IsNil(o.Url) {
return true
}
return false
}
// SetUrl gets a reference to the given string and assigns it to the Url field.
func (o *DocSearchResult) SetUrl(v string) {
o.Url = &v
}
func (o DocSearchResult) MarshalJSON() ([]byte, error) {
toSerialize, err := o.ToMap()
if err != nil {
return []byte{}, err
}
return json.Marshal(toSerialize)
}
func (o DocSearchResult) ToMap() (map[string]interface{}, error) {
toSerialize := map[string]interface{}{}
if !IsNil(o.Breadcrumbs) {
toSerialize["breadcrumbs"] = o.Breadcrumbs
}
if !IsNil(o.Content) {
toSerialize["content"] = o.Content
}
if !IsNil(o.FileId) {
toSerialize["file_id"] = o.FileId
}
if !IsNil(o.Id) {
toSerialize["id"] = o.Id
}
if !IsNil(o.Title) {
toSerialize["title"] = o.Title
}
if !IsNil(o.Type) {
toSerialize["type"] = o.Type
}
if !IsNil(o.Url) {
toSerialize["url"] = o.Url
}
for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return toSerialize, nil
}
func (o *DocSearchResult) UnmarshalJSON(data []byte) (err error) {
varDocSearchResult := _DocSearchResult{}
err = json.Unmarshal(data, &varDocSearchResult)
if err != nil {
return err
}
*o = DocSearchResult(varDocSearchResult)
additionalProperties := make(map[string]interface{})
if err = json.Unmarshal(data, &additionalProperties); err == nil {
delete(additionalProperties, "breadcrumbs")
delete(additionalProperties, "content")
delete(additionalProperties, "file_id")
delete(additionalProperties, "id")
delete(additionalProperties, "title")
delete(additionalProperties, "type")
delete(additionalProperties, "url")
o.AdditionalProperties = additionalProperties
}
return err
}
type NullableDocSearchResult struct {
value *DocSearchResult
isSet bool
}
func (v NullableDocSearchResult) Get() *DocSearchResult {
return v.value
}
func (v *NullableDocSearchResult) Set(val *DocSearchResult) {
v.value = val
v.isSet = true
}
func (v NullableDocSearchResult) IsSet() bool {
return v.isSet
}
func (v *NullableDocSearchResult) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableDocSearchResult(val *DocSearchResult) *NullableDocSearchResult {
return &NullableDocSearchResult{value: val, isSet: true}
}
func (v NullableDocSearchResult) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableDocSearchResult) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}