187 lines
4.3 KiB
Go
187 lines
4.3 KiB
Go
/*
|
|
* Subset of Influx API covered by Influx CLI
|
|
*
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* API version: 2.0.0
|
|
*/
|
|
|
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"encoding/json"
|
|
)
|
|
|
|
// DictItem A key/value pair in a dictionary
|
|
type DictItem struct {
|
|
// Type of AST node
|
|
Type *string `json:"type,omitempty"`
|
|
Key *Expression `json:"key,omitempty"`
|
|
Val *Expression `json:"val,omitempty"`
|
|
}
|
|
|
|
// NewDictItem instantiates a new DictItem 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 NewDictItem() *DictItem {
|
|
this := DictItem{}
|
|
return &this
|
|
}
|
|
|
|
// NewDictItemWithDefaults instantiates a new DictItem 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 NewDictItemWithDefaults() *DictItem {
|
|
this := DictItem{}
|
|
return &this
|
|
}
|
|
|
|
// GetType returns the Type field value if set, zero value otherwise.
|
|
func (o *DictItem) 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 *DictItem) 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 *DictItem) 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 *DictItem) SetType(v string) {
|
|
o.Type = &v
|
|
}
|
|
|
|
// GetKey returns the Key field value if set, zero value otherwise.
|
|
func (o *DictItem) GetKey() Expression {
|
|
if o == nil || o.Key == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Key
|
|
}
|
|
|
|
// GetKeyOk returns a tuple with the Key field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DictItem) GetKeyOk() (*Expression, bool) {
|
|
if o == nil || o.Key == nil {
|
|
return nil, false
|
|
}
|
|
return o.Key, true
|
|
}
|
|
|
|
// HasKey returns a boolean if a field has been set.
|
|
func (o *DictItem) HasKey() bool {
|
|
if o != nil && o.Key != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetKey gets a reference to the given Expression and assigns it to the Key field.
|
|
func (o *DictItem) SetKey(v Expression) {
|
|
o.Key = &v
|
|
}
|
|
|
|
// GetVal returns the Val field value if set, zero value otherwise.
|
|
func (o *DictItem) GetVal() Expression {
|
|
if o == nil || o.Val == nil {
|
|
var ret Expression
|
|
return ret
|
|
}
|
|
return *o.Val
|
|
}
|
|
|
|
// GetValOk returns a tuple with the Val field value if set, nil otherwise
|
|
// and a boolean to check if the value has been set.
|
|
func (o *DictItem) GetValOk() (*Expression, bool) {
|
|
if o == nil || o.Val == nil {
|
|
return nil, false
|
|
}
|
|
return o.Val, true
|
|
}
|
|
|
|
// HasVal returns a boolean if a field has been set.
|
|
func (o *DictItem) HasVal() bool {
|
|
if o != nil && o.Val != nil {
|
|
return true
|
|
}
|
|
|
|
return false
|
|
}
|
|
|
|
// SetVal gets a reference to the given Expression and assigns it to the Val field.
|
|
func (o *DictItem) SetVal(v Expression) {
|
|
o.Val = &v
|
|
}
|
|
|
|
func (o DictItem) MarshalJSON() ([]byte, error) {
|
|
toSerialize := map[string]interface{}{}
|
|
if o.Type != nil {
|
|
toSerialize["type"] = o.Type
|
|
}
|
|
if o.Key != nil {
|
|
toSerialize["key"] = o.Key
|
|
}
|
|
if o.Val != nil {
|
|
toSerialize["val"] = o.Val
|
|
}
|
|
return json.Marshal(toSerialize)
|
|
}
|
|
|
|
type NullableDictItem struct {
|
|
value *DictItem
|
|
isSet bool
|
|
}
|
|
|
|
func (v NullableDictItem) Get() *DictItem {
|
|
return v.value
|
|
}
|
|
|
|
func (v *NullableDictItem) Set(val *DictItem) {
|
|
v.value = val
|
|
v.isSet = true
|
|
}
|
|
|
|
func (v NullableDictItem) IsSet() bool {
|
|
return v.isSet
|
|
}
|
|
|
|
func (v *NullableDictItem) Unset() {
|
|
v.value = nil
|
|
v.isSet = false
|
|
}
|
|
|
|
func NewNullableDictItem(val *DictItem) *NullableDictItem {
|
|
return &NullableDictItem{value: val, isSet: true}
|
|
}
|
|
|
|
func (v NullableDictItem) MarshalJSON() ([]byte, error) {
|
|
return json.Marshal(v.value)
|
|
}
|
|
|
|
func (v *NullableDictItem) UnmarshalJSON(src []byte) error {
|
|
v.isSet = true
|
|
return json.Unmarshal(src, &v.value)
|
|
}
|