1 Star 0 Fork 0

saxon134/zincsearch

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_meta_hit.go 8.76 KB
一键复制 编辑 原始数据 按行查看 历史
saxon134 提交于 2024-01-31 15:26 +08:00 . 改包名
/*
Zinc Search engine API
Zinc Search engine API documents https://docs.zincsearch.com
API version: 0.3.3
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
package zincsearch
import (
"encoding/json"
)
// MetaHit struct for MetaHit
type MetaHit struct {
Timestamp *string `json:"@timestamp,omitempty"`
Id *string `json:"_id,omitempty"`
Index *string `json:"_index,omitempty"`
Score *float32 `json:"_score,omitempty"`
Source map[string]interface{} `json:"_source,omitempty"`
Type *string `json:"_type,omitempty"`
Fields map[string]interface{} `json:"fields,omitempty"`
Highlight map[string]interface{} `json:"highlight,omitempty"`
}
// NewMetaHit instantiates a new MetaHit 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 NewMetaHit() *MetaHit {
this := MetaHit{}
return &this
}
// NewMetaHitWithDefaults instantiates a new MetaHit 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 NewMetaHitWithDefaults() *MetaHit {
this := MetaHit{}
return &this
}
// GetTimestamp returns the Timestamp field value if set, zero value otherwise.
func (o *MetaHit) GetTimestamp() string {
if o == nil || o.Timestamp == nil {
var ret string
return ret
}
return *o.Timestamp
}
// GetTimestampOk returns a tuple with the Timestamp field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaHit) GetTimestampOk() (*string, bool) {
if o == nil || o.Timestamp == nil {
return nil, false
}
return o.Timestamp, true
}
// HasTimestamp returns a boolean if a field has been set.
func (o *MetaHit) HasTimestamp() bool {
if o != nil && o.Timestamp != nil {
return true
}
return false
}
// SetTimestamp gets a reference to the given string and assigns it to the Timestamp field.
func (o *MetaHit) SetTimestamp(v string) {
o.Timestamp = &v
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *MetaHit) GetId() string {
if o == nil || o.Id == nil {
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 *MetaHit) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *MetaHit) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *MetaHit) SetId(v string) {
o.Id = &v
}
// GetIndex returns the Index field value if set, zero value otherwise.
func (o *MetaHit) GetIndex() string {
if o == nil || o.Index == nil {
var ret string
return ret
}
return *o.Index
}
// GetIndexOk returns a tuple with the Index field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaHit) GetIndexOk() (*string, bool) {
if o == nil || o.Index == nil {
return nil, false
}
return o.Index, true
}
// HasIndex returns a boolean if a field has been set.
func (o *MetaHit) HasIndex() bool {
if o != nil && o.Index != nil {
return true
}
return false
}
// SetIndex gets a reference to the given string and assigns it to the Index field.
func (o *MetaHit) SetIndex(v string) {
o.Index = &v
}
// GetScore returns the Score field value if set, zero value otherwise.
func (o *MetaHit) GetScore() float32 {
if o == nil || o.Score == nil {
var ret float32
return ret
}
return *o.Score
}
// GetScoreOk returns a tuple with the Score field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaHit) GetScoreOk() (*float32, bool) {
if o == nil || o.Score == nil {
return nil, false
}
return o.Score, true
}
// HasScore returns a boolean if a field has been set.
func (o *MetaHit) HasScore() bool {
if o != nil && o.Score != nil {
return true
}
return false
}
// SetScore gets a reference to the given float32 and assigns it to the Score field.
func (o *MetaHit) SetScore(v float32) {
o.Score = &v
}
// GetSource returns the Source field value if set, zero value otherwise.
func (o *MetaHit) GetSource() map[string]interface{} {
if o == nil || o.Source == nil {
var ret map[string]interface{}
return ret
}
return o.Source
}
// GetSourceOk returns a tuple with the Source field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaHit) GetSourceOk() (map[string]interface{}, bool) {
if o == nil || o.Source == nil {
return nil, false
}
return o.Source, true
}
// HasSource returns a boolean if a field has been set.
func (o *MetaHit) HasSource() bool {
if o != nil && o.Source != nil {
return true
}
return false
}
// SetSource gets a reference to the given map[string]interface{} and assigns it to the Source field.
func (o *MetaHit) SetSource(v map[string]interface{}) {
o.Source = v
}
// GetType returns the Type field value if set, zero value otherwise.
func (o *MetaHit) GetType() string {
if o == nil || o.Type == nil {
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 *MetaHit) GetTypeOk() (*string, bool) {
if o == nil || o.Type == nil {
return nil, false
}
return o.Type, true
}
// HasType returns a boolean if a field has been set.
func (o *MetaHit) HasType() bool {
if o != nil && o.Type != nil {
return true
}
return false
}
// SetType gets a reference to the given string and assigns it to the Type field.
func (o *MetaHit) SetType(v string) {
o.Type = &v
}
// GetFields returns the Fields field value if set, zero value otherwise.
func (o *MetaHit) GetFields() map[string]interface{} {
if o == nil || o.Fields == nil {
var ret map[string]interface{}
return ret
}
return o.Fields
}
// GetFieldsOk returns a tuple with the Fields field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaHit) GetFieldsOk() (map[string]interface{}, bool) {
if o == nil || o.Fields == nil {
return nil, false
}
return o.Fields, true
}
// HasFields returns a boolean if a field has been set.
func (o *MetaHit) HasFields() bool {
if o != nil && o.Fields != nil {
return true
}
return false
}
// SetFields gets a reference to the given map[string]interface{} and assigns it to the Fields field.
func (o *MetaHit) SetFields(v map[string]interface{}) {
o.Fields = v
}
// GetHighlight returns the Highlight field value if set, zero value otherwise.
func (o *MetaHit) GetHighlight() map[string]interface{} {
if o == nil || o.Highlight == nil {
var ret map[string]interface{}
return ret
}
return o.Highlight
}
// GetHighlightOk returns a tuple with the Highlight field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaHit) GetHighlightOk() (map[string]interface{}, bool) {
if o == nil || o.Highlight == nil {
return nil, false
}
return o.Highlight, true
}
// HasHighlight returns a boolean if a field has been set.
func (o *MetaHit) HasHighlight() bool {
if o != nil && o.Highlight != nil {
return true
}
return false
}
// SetHighlight gets a reference to the given map[string]interface{} and assigns it to the Highlight field.
func (o *MetaHit) SetHighlight(v map[string]interface{}) {
o.Highlight = v
}
func (o MetaHit) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Timestamp != nil {
toSerialize["@timestamp"] = o.Timestamp
}
if o.Id != nil {
toSerialize["_id"] = o.Id
}
if o.Index != nil {
toSerialize["_index"] = o.Index
}
if o.Score != nil {
toSerialize["_score"] = o.Score
}
if o.Source != nil {
toSerialize["_source"] = o.Source
}
if o.Type != nil {
toSerialize["_type"] = o.Type
}
if o.Fields != nil {
toSerialize["fields"] = o.Fields
}
if o.Highlight != nil {
toSerialize["highlight"] = o.Highlight
}
return json.Marshal(toSerialize)
}
type NullableMetaHit struct {
value *MetaHit
isSet bool
}
func (v NullableMetaHit) Get() *MetaHit {
return v.value
}
func (v *NullableMetaHit) Set(val *MetaHit) {
v.value = val
v.isSet = true
}
func (v NullableMetaHit) IsSet() bool {
return v.isSet
}
func (v *NullableMetaHit) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetaHit(val *MetaHit) *NullableMetaHit {
return &NullableMetaHit{value: val, isSet: true}
}
func (v NullableMetaHit) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetaHit) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/saxon134/zincsearch.git
git@gitee.com:saxon134/zincsearch.git
saxon134
zincsearch
zincsearch
fa162905b9da

搜索帮助