sdk-go-zincsearch/model_meta_index_simple.go
2022-09-21 18:18:06 +08:00

260 lines
6.7 KiB
Go

/*
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 client
import (
"encoding/json"
)
// MetaIndexSimple struct for MetaIndexSimple
type MetaIndexSimple struct {
Mappings map[string]interface{} `json:"mappings,omitempty"`
Name *string `json:"name,omitempty"`
Settings *MetaIndexSettings `json:"settings,omitempty"`
ShardNum *int32 `json:"shard_num,omitempty"`
StorageType *string `json:"storage_type,omitempty"`
}
// NewMetaIndexSimple instantiates a new MetaIndexSimple 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 NewMetaIndexSimple() *MetaIndexSimple {
this := MetaIndexSimple{}
return &this
}
// NewMetaIndexSimpleWithDefaults instantiates a new MetaIndexSimple 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 NewMetaIndexSimpleWithDefaults() *MetaIndexSimple {
this := MetaIndexSimple{}
return &this
}
// GetMappings returns the Mappings field value if set, zero value otherwise.
func (o *MetaIndexSimple) GetMappings() map[string]interface{} {
if o == nil || o.Mappings == nil {
var ret map[string]interface{}
return ret
}
return o.Mappings
}
// GetMappingsOk returns a tuple with the Mappings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaIndexSimple) GetMappingsOk() (map[string]interface{}, bool) {
if o == nil || o.Mappings == nil {
return nil, false
}
return o.Mappings, true
}
// HasMappings returns a boolean if a field has been set.
func (o *MetaIndexSimple) HasMappings() bool {
if o != nil && o.Mappings != nil {
return true
}
return false
}
// SetMappings gets a reference to the given map[string]interface{} and assigns it to the Mappings field.
func (o *MetaIndexSimple) SetMappings(v map[string]interface{}) {
o.Mappings = v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *MetaIndexSimple) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaIndexSimple) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *MetaIndexSimple) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *MetaIndexSimple) SetName(v string) {
o.Name = &v
}
// GetSettings returns the Settings field value if set, zero value otherwise.
func (o *MetaIndexSimple) GetSettings() MetaIndexSettings {
if o == nil || o.Settings == nil {
var ret MetaIndexSettings
return ret
}
return *o.Settings
}
// GetSettingsOk returns a tuple with the Settings field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaIndexSimple) GetSettingsOk() (*MetaIndexSettings, bool) {
if o == nil || o.Settings == nil {
return nil, false
}
return o.Settings, true
}
// HasSettings returns a boolean if a field has been set.
func (o *MetaIndexSimple) HasSettings() bool {
if o != nil && o.Settings != nil {
return true
}
return false
}
// SetSettings gets a reference to the given MetaIndexSettings and assigns it to the Settings field.
func (o *MetaIndexSimple) SetSettings(v MetaIndexSettings) {
o.Settings = &v
}
// GetShardNum returns the ShardNum field value if set, zero value otherwise.
func (o *MetaIndexSimple) GetShardNum() int32 {
if o == nil || o.ShardNum == nil {
var ret int32
return ret
}
return *o.ShardNum
}
// GetShardNumOk returns a tuple with the ShardNum field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaIndexSimple) GetShardNumOk() (*int32, bool) {
if o == nil || o.ShardNum == nil {
return nil, false
}
return o.ShardNum, true
}
// HasShardNum returns a boolean if a field has been set.
func (o *MetaIndexSimple) HasShardNum() bool {
if o != nil && o.ShardNum != nil {
return true
}
return false
}
// SetShardNum gets a reference to the given int32 and assigns it to the ShardNum field.
func (o *MetaIndexSimple) SetShardNum(v int32) {
o.ShardNum = &v
}
// GetStorageType returns the StorageType field value if set, zero value otherwise.
func (o *MetaIndexSimple) GetStorageType() string {
if o == nil || o.StorageType == nil {
var ret string
return ret
}
return *o.StorageType
}
// GetStorageTypeOk returns a tuple with the StorageType field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *MetaIndexSimple) GetStorageTypeOk() (*string, bool) {
if o == nil || o.StorageType == nil {
return nil, false
}
return o.StorageType, true
}
// HasStorageType returns a boolean if a field has been set.
func (o *MetaIndexSimple) HasStorageType() bool {
if o != nil && o.StorageType != nil {
return true
}
return false
}
// SetStorageType gets a reference to the given string and assigns it to the StorageType field.
func (o *MetaIndexSimple) SetStorageType(v string) {
o.StorageType = &v
}
func (o MetaIndexSimple) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Mappings != nil {
toSerialize["mappings"] = o.Mappings
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Settings != nil {
toSerialize["settings"] = o.Settings
}
if o.ShardNum != nil {
toSerialize["shard_num"] = o.ShardNum
}
if o.StorageType != nil {
toSerialize["storage_type"] = o.StorageType
}
return json.Marshal(toSerialize)
}
type NullableMetaIndexSimple struct {
value *MetaIndexSimple
isSet bool
}
func (v NullableMetaIndexSimple) Get() *MetaIndexSimple {
return v.value
}
func (v *NullableMetaIndexSimple) Set(val *MetaIndexSimple) {
v.value = val
v.isSet = true
}
func (v NullableMetaIndexSimple) IsSet() bool {
return v.isSet
}
func (v *NullableMetaIndexSimple) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableMetaIndexSimple(val *MetaIndexSimple) *NullableMetaIndexSimple {
return &NullableMetaIndexSimple{value: val, isSet: true}
}
func (v NullableMetaIndexSimple) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableMetaIndexSimple) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}