1 Star 0 Fork 0

saxon134/zincsearch

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
model_meta_aggregation_histogram.go 10.05 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"
)
// MetaAggregationHistogram struct for MetaAggregationHistogram
type MetaAggregationHistogram struct {
ExtendedBounds *AggregationHistogramBound `json:"extended_bounds,omitempty"`
Field *string `json:"field,omitempty"`
HardBounds *AggregationHistogramBound `json:"hard_bounds,omitempty"`
Interval *float32 `json:"interval,omitempty"`
Keyed *bool `json:"keyed,omitempty"`
MinDocCount *int32 `json:"min_doc_count,omitempty"`
Offset *float32 `json:"offset,omitempty"`
Size *int32 `json:"size,omitempty"`
}
// NewMetaAggregationHistogram instantiates a new MetaAggregationHistogram 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 NewMetaAggregationHistogram() *MetaAggregationHistogram {
this := MetaAggregationHistogram{}
return &this
}
// NewMetaAggregationHistogramWithDefaults instantiates a new MetaAggregationHistogram 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 NewMetaAggregationHistogramWithDefaults() *MetaAggregationHistogram {
this := MetaAggregationHistogram{}
return &this
}
// GetExtendedBounds returns the ExtendedBounds field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetExtendedBounds() AggregationHistogramBound {
if o == nil || o.ExtendedBounds == nil {
var ret AggregationHistogramBound
return ret
}
return *o.ExtendedBounds
}
// GetExtendedBoundsOk returns a tuple with the ExtendedBounds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetExtendedBoundsOk() (*AggregationHistogramBound, bool) {
if o == nil || o.ExtendedBounds == nil {
return nil, false
}
return o.ExtendedBounds, true
}
// HasExtendedBounds returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasExtendedBounds() bool {
if o != nil && o.ExtendedBounds != nil {
return true
}
return false
}
// SetExtendedBounds gets a reference to the given AggregationHistogramBound and assigns it to the ExtendedBounds field.
func (o *MetaAggregationHistogram) SetExtendedBounds(v AggregationHistogramBound) {
o.ExtendedBounds = &v
}
// GetField returns the Field field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetField() string {
if o == nil || o.Field == nil {
var ret string
return ret
}
return *o.Field
}
// GetFieldOk returns a tuple with the Field field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetFieldOk() (*string, bool) {
if o == nil || o.Field == nil {
return nil, false
}
return o.Field, true
}
// HasField returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasField() bool {
if o != nil && o.Field != nil {
return true
}
return false
}
// SetField gets a reference to the given string and assigns it to the Field field.
func (o *MetaAggregationHistogram) SetField(v string) {
o.Field = &v
}
// GetHardBounds returns the HardBounds field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetHardBounds() AggregationHistogramBound {
if o == nil || o.HardBounds == nil {
var ret AggregationHistogramBound
return ret
}
return *o.HardBounds
}
// GetHardBoundsOk returns a tuple with the HardBounds field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetHardBoundsOk() (*AggregationHistogramBound, bool) {
if o == nil || o.HardBounds == nil {
return nil, false
}
return o.HardBounds, true
}
// HasHardBounds returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasHardBounds() bool {
if o != nil && o.HardBounds != nil {
return true
}
return false
}
// SetHardBounds gets a reference to the given AggregationHistogramBound and assigns it to the HardBounds field.
func (o *MetaAggregationHistogram) SetHardBounds(v AggregationHistogramBound) {
o.HardBounds = &v
}
// GetInterval returns the Interval field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetInterval() float32 {
if o == nil || o.Interval == nil {
var ret float32
return ret
}
return *o.Interval
}
// GetIntervalOk returns a tuple with the Interval field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetIntervalOk() (*float32, bool) {
if o == nil || o.Interval == nil {
return nil, false
}
return o.Interval, true
}
// HasInterval returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasInterval() bool {
if o != nil && o.Interval != nil {
return true
}
return false
}
// SetInterval gets a reference to the given float32 and assigns it to the Interval field.
func (o *MetaAggregationHistogram) SetInterval(v float32) {
o.Interval = &v
}
// GetKeyed returns the Keyed field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetKeyed() bool {
if o == nil || o.Keyed == nil {
var ret bool
return ret
}
return *o.Keyed
}
// GetKeyedOk returns a tuple with the Keyed field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetKeyedOk() (*bool, bool) {
if o == nil || o.Keyed == nil {
return nil, false
}
return o.Keyed, true
}
// HasKeyed returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasKeyed() bool {
if o != nil && o.Keyed != nil {
return true
}
return false
}
// SetKeyed gets a reference to the given bool and assigns it to the Keyed field.
func (o *MetaAggregationHistogram) SetKeyed(v bool) {
o.Keyed = &v
}
// GetMinDocCount returns the MinDocCount field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetMinDocCount() int32 {
if o == nil || o.MinDocCount == nil {
var ret int32
return ret
}
return *o.MinDocCount
}
// GetMinDocCountOk returns a tuple with the MinDocCount field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetMinDocCountOk() (*int32, bool) {
if o == nil || o.MinDocCount == nil {
return nil, false
}
return o.MinDocCount, true
}
// HasMinDocCount returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasMinDocCount() bool {
if o != nil && o.MinDocCount != nil {
return true
}
return false
}
// SetMinDocCount gets a reference to the given int32 and assigns it to the MinDocCount field.
func (o *MetaAggregationHistogram) SetMinDocCount(v int32) {
o.MinDocCount = &v
}
// GetOffset returns the Offset field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetOffset() float32 {
if o == nil || o.Offset == nil {
var ret float32
return ret
}
return *o.Offset
}
// GetOffsetOk returns a tuple with the Offset field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetOffsetOk() (*float32, bool) {
if o == nil || o.Offset == nil {
return nil, false
}
return o.Offset, true
}
// HasOffset returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasOffset() bool {
if o != nil && o.Offset != nil {
return true
}
return false
}
// SetOffset gets a reference to the given float32 and assigns it to the Offset field.
func (o *MetaAggregationHistogram) SetOffset(v float32) {
o.Offset = &v
}
// GetSize returns the Size field value if set, zero value otherwise.
func (o *MetaAggregationHistogram) GetSize() int32 {
if o == nil || o.Size == nil {
var ret int32
return ret
}
return *o.Size
}
// GetSizeOk returns a tuple with the Size field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaAggregationHistogram) GetSizeOk() (*int32, bool) {
if o == nil || o.Size == nil {
return nil, false
}
return o.Size, true
}
// HasSize returns a boolean if a field has been set.
func (o *MetaAggregationHistogram) HasSize() bool {
if o != nil && o.Size != nil {
return true
}
return false
}
// SetSize gets a reference to the given int32 and assigns it to the Size field.
func (o *MetaAggregationHistogram) SetSize(v int32) {
o.Size = &v
}
func (o MetaAggregationHistogram) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.ExtendedBounds != nil {
toSerialize["extended_bounds"] = o.ExtendedBounds
}
if o.Field != nil {
toSerialize["field"] = o.Field
}
if o.HardBounds != nil {
toSerialize["hard_bounds"] = o.HardBounds
}
if o.Interval != nil {
toSerialize["interval"] = o.Interval
}
if o.Keyed != nil {
toSerialize["keyed"] = o.Keyed
}
if o.MinDocCount != nil {
toSerialize["min_doc_count"] = o.MinDocCount
}
if o.Offset != nil {
toSerialize["offset"] = o.Offset
}
if o.Size != nil {
toSerialize["size"] = o.Size
}
return json.Marshal(toSerialize)
}
type NullableMetaAggregationHistogram struct {
value *MetaAggregationHistogram
isSet bool
}
func (v NullableMetaAggregationHistogram) Get() *MetaAggregationHistogram {
return v.value
}
func (v *NullableMetaAggregationHistogram) Set(val *MetaAggregationHistogram) {
v.value = val
v.isSet = true
}
func (v NullableMetaAggregationHistogram) IsSet() bool {
return v.isSet
}
func (v *NullableMetaAggregationHistogram) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetaAggregationHistogram(val *MetaAggregationHistogram) *NullableMetaAggregationHistogram {
return &NullableMetaAggregationHistogram{value: val, isSet: true}
}
func (v NullableMetaAggregationHistogram) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetaAggregationHistogram) 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

搜索帮助