influx-cli/api/model_influxql_json_response_results.gen.go
Andrew Lee fc529745a5
feat: add back the InfluxQL REPL (#386)
* add v1-compatible query path and refactor other paths to de-duplicate "/query"

* add initial influxQL repl

* add ping endpoint to schema

* improve prompt UX, implement some commands

* fix json column type in schema and improve completion

* feat: add table formatter and move to forked go-prompt

* improve formatting and add table pagination

* implement more REPL commands, including insert and history

* implement "INSERT INTO"

* move repl command to "v1 repl"

* refactor and improve documentation

* clean up v1_repl cmd

* update to latest openapi, use some openapi paths instead of overrides

* remove additional files that were moved to openapi

* compute historyFilePath at REPL start

* clean up REPL use command logic flow

* clean up comments for TODOs now in issues

* move gopher (chonky boi)

* remove autocompletion for separate PR

* run go mod tidy

* add rfc3339 precision option

* allow left and right column scrolling to display whole table

* add error to JSON query response

* add tags and partial to JSON response series schema

* fix csv formatting and add column formatting

* remove table format for separate PR

* fix getDatabases

* move from write to legacy write endpoint for INSERT

* remove history vestiges

* allow multiple spaces in INSERT commands

* add precision comment

* remove auth for separate PR

* separate parseInsert and add unit test

* add additional test case and improve error messages

* fix missing errors import

* print rfc3339 precision

* add rfc3339 to help output
2022-06-10 08:54:07 -06:00

186 lines
5.4 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"
)
// InfluxqlJsonResponseResults struct for InfluxqlJsonResponseResults
type InfluxqlJsonResponseResults struct {
StatementId *int32 `json:"statement_id,omitempty" yaml:"statement_id,omitempty"`
Error *string `json:"error,omitempty" yaml:"error,omitempty"`
Series *[]InfluxqlJsonResponseSeries `json:"series,omitempty" yaml:"series,omitempty"`
}
// NewInfluxqlJsonResponseResults instantiates a new InfluxqlJsonResponseResults 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 NewInfluxqlJsonResponseResults() *InfluxqlJsonResponseResults {
this := InfluxqlJsonResponseResults{}
return &this
}
// NewInfluxqlJsonResponseResultsWithDefaults instantiates a new InfluxqlJsonResponseResults 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 NewInfluxqlJsonResponseResultsWithDefaults() *InfluxqlJsonResponseResults {
this := InfluxqlJsonResponseResults{}
return &this
}
// GetStatementId returns the StatementId field value if set, zero value otherwise.
func (o *InfluxqlJsonResponseResults) GetStatementId() int32 {
if o == nil || o.StatementId == nil {
var ret int32
return ret
}
return *o.StatementId
}
// GetStatementIdOk returns a tuple with the StatementId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InfluxqlJsonResponseResults) GetStatementIdOk() (*int32, bool) {
if o == nil || o.StatementId == nil {
return nil, false
}
return o.StatementId, true
}
// HasStatementId returns a boolean if a field has been set.
func (o *InfluxqlJsonResponseResults) HasStatementId() bool {
if o != nil && o.StatementId != nil {
return true
}
return false
}
// SetStatementId gets a reference to the given int32 and assigns it to the StatementId field.
func (o *InfluxqlJsonResponseResults) SetStatementId(v int32) {
o.StatementId = &v
}
// GetError returns the Error field value if set, zero value otherwise.
func (o *InfluxqlJsonResponseResults) GetError() string {
if o == nil || o.Error == nil {
var ret string
return ret
}
return *o.Error
}
// GetErrorOk returns a tuple with the Error field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InfluxqlJsonResponseResults) GetErrorOk() (*string, bool) {
if o == nil || o.Error == nil {
return nil, false
}
return o.Error, true
}
// HasError returns a boolean if a field has been set.
func (o *InfluxqlJsonResponseResults) HasError() bool {
if o != nil && o.Error != nil {
return true
}
return false
}
// SetError gets a reference to the given string and assigns it to the Error field.
func (o *InfluxqlJsonResponseResults) SetError(v string) {
o.Error = &v
}
// GetSeries returns the Series field value if set, zero value otherwise.
func (o *InfluxqlJsonResponseResults) GetSeries() []InfluxqlJsonResponseSeries {
if o == nil || o.Series == nil {
var ret []InfluxqlJsonResponseSeries
return ret
}
return *o.Series
}
// GetSeriesOk returns a tuple with the Series field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *InfluxqlJsonResponseResults) GetSeriesOk() (*[]InfluxqlJsonResponseSeries, bool) {
if o == nil || o.Series == nil {
return nil, false
}
return o.Series, true
}
// HasSeries returns a boolean if a field has been set.
func (o *InfluxqlJsonResponseResults) HasSeries() bool {
if o != nil && o.Series != nil {
return true
}
return false
}
// SetSeries gets a reference to the given []InfluxqlJsonResponseSeries and assigns it to the Series field.
func (o *InfluxqlJsonResponseResults) SetSeries(v []InfluxqlJsonResponseSeries) {
o.Series = &v
}
func (o InfluxqlJsonResponseResults) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.StatementId != nil {
toSerialize["statement_id"] = o.StatementId
}
if o.Error != nil {
toSerialize["error"] = o.Error
}
if o.Series != nil {
toSerialize["series"] = o.Series
}
return json.Marshal(toSerialize)
}
type NullableInfluxqlJsonResponseResults struct {
value *InfluxqlJsonResponseResults
isSet bool
}
func (v NullableInfluxqlJsonResponseResults) Get() *InfluxqlJsonResponseResults {
return v.value
}
func (v *NullableInfluxqlJsonResponseResults) Set(val *InfluxqlJsonResponseResults) {
v.value = val
v.isSet = true
}
func (v NullableInfluxqlJsonResponseResults) IsSet() bool {
return v.isSet
}
func (v *NullableInfluxqlJsonResponseResults) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableInfluxqlJsonResponseResults(val *InfluxqlJsonResponseResults) *NullableInfluxqlJsonResponseResults {
return &NullableInfluxqlJsonResponseResults{value: val, isSet: true}
}
func (v NullableInfluxqlJsonResponseResults) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableInfluxqlJsonResponseResults) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}