refactor: expose generated code and client business logic to share with Kapacitor (#103)
* refactor: take clients out of internal * refactor: move stdio to pkg * Move internal/api to api * refactor: final changes for Kapacitor to access shared functionality * chore: regenerate mocks * fix: bad automated refactor * chore: extra formatting not caught by make fmt
This commit is contained in:
149
api/model_runs.gen.go
Normal file
149
api/model_runs.gen.go
Normal file
@ -0,0 +1,149 @@
|
||||
/*
|
||||
* 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"
|
||||
)
|
||||
|
||||
// Runs struct for Runs
|
||||
type Runs struct {
|
||||
Links *Links `json:"links,omitempty"`
|
||||
Runs *[]Run `json:"runs,omitempty"`
|
||||
}
|
||||
|
||||
// NewRuns instantiates a new Runs 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 NewRuns() *Runs {
|
||||
this := Runs{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// NewRunsWithDefaults instantiates a new Runs 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 NewRunsWithDefaults() *Runs {
|
||||
this := Runs{}
|
||||
return &this
|
||||
}
|
||||
|
||||
// GetLinks returns the Links field value if set, zero value otherwise.
|
||||
func (o *Runs) GetLinks() Links {
|
||||
if o == nil || o.Links == nil {
|
||||
var ret Links
|
||||
return ret
|
||||
}
|
||||
return *o.Links
|
||||
}
|
||||
|
||||
// GetLinksOk returns a tuple with the Links field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Runs) GetLinksOk() (*Links, bool) {
|
||||
if o == nil || o.Links == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Links, true
|
||||
}
|
||||
|
||||
// HasLinks returns a boolean if a field has been set.
|
||||
func (o *Runs) HasLinks() bool {
|
||||
if o != nil && o.Links != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetLinks gets a reference to the given Links and assigns it to the Links field.
|
||||
func (o *Runs) SetLinks(v Links) {
|
||||
o.Links = &v
|
||||
}
|
||||
|
||||
// GetRuns returns the Runs field value if set, zero value otherwise.
|
||||
func (o *Runs) GetRuns() []Run {
|
||||
if o == nil || o.Runs == nil {
|
||||
var ret []Run
|
||||
return ret
|
||||
}
|
||||
return *o.Runs
|
||||
}
|
||||
|
||||
// GetRunsOk returns a tuple with the Runs field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *Runs) GetRunsOk() (*[]Run, bool) {
|
||||
if o == nil || o.Runs == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Runs, true
|
||||
}
|
||||
|
||||
// HasRuns returns a boolean if a field has been set.
|
||||
func (o *Runs) HasRuns() bool {
|
||||
if o != nil && o.Runs != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetRuns gets a reference to the given []Run and assigns it to the Runs field.
|
||||
func (o *Runs) SetRuns(v []Run) {
|
||||
o.Runs = &v
|
||||
}
|
||||
|
||||
func (o Runs) MarshalJSON() ([]byte, error) {
|
||||
toSerialize := map[string]interface{}{}
|
||||
if o.Links != nil {
|
||||
toSerialize["links"] = o.Links
|
||||
}
|
||||
if o.Runs != nil {
|
||||
toSerialize["runs"] = o.Runs
|
||||
}
|
||||
return json.Marshal(toSerialize)
|
||||
}
|
||||
|
||||
type NullableRuns struct {
|
||||
value *Runs
|
||||
isSet bool
|
||||
}
|
||||
|
||||
func (v NullableRuns) Get() *Runs {
|
||||
return v.value
|
||||
}
|
||||
|
||||
func (v *NullableRuns) Set(val *Runs) {
|
||||
v.value = val
|
||||
v.isSet = true
|
||||
}
|
||||
|
||||
func (v NullableRuns) IsSet() bool {
|
||||
return v.isSet
|
||||
}
|
||||
|
||||
func (v *NullableRuns) Unset() {
|
||||
v.value = nil
|
||||
v.isSet = false
|
||||
}
|
||||
|
||||
func NewNullableRuns(val *Runs) *NullableRuns {
|
||||
return &NullableRuns{value: val, isSet: true}
|
||||
}
|
||||
|
||||
func (v NullableRuns) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(v.value)
|
||||
}
|
||||
|
||||
func (v *NullableRuns) UnmarshalJSON(src []byte) error {
|
||||
v.isSet = true
|
||||
return json.Unmarshal(src, &v.value)
|
||||
}
|
Reference in New Issue
Block a user