feat: add virtual column to DBRP printing (#435)
* feat: add virtual column to DBRP printing * fix: update DBRP tests with new virtual column * chore: update to latest openapi
This commit is contained in:
@ -27,7 +27,9 @@ type DBRP struct {
|
||||
// InfluxDB v1 retention policy
|
||||
RetentionPolicy string `json:"retention_policy" yaml:"retention_policy"`
|
||||
// Mapping represents the default retention policy for the database specified.
|
||||
Default bool `json:"default" yaml:"default"`
|
||||
Default bool `json:"default" yaml:"default"`
|
||||
// Indicates an autogenerated, virtual mapping based on the bucket name. Currently only available in OSS.
|
||||
Virtual *bool `json:"virtual,omitempty" yaml:"virtual,omitempty"`
|
||||
Links *Links `json:"links,omitempty" yaml:"links,omitempty"`
|
||||
}
|
||||
|
||||
@ -198,6 +200,38 @@ func (o *DBRP) SetDefault(v bool) {
|
||||
o.Default = v
|
||||
}
|
||||
|
||||
// GetVirtual returns the Virtual field value if set, zero value otherwise.
|
||||
func (o *DBRP) GetVirtual() bool {
|
||||
if o == nil || o.Virtual == nil {
|
||||
var ret bool
|
||||
return ret
|
||||
}
|
||||
return *o.Virtual
|
||||
}
|
||||
|
||||
// GetVirtualOk returns a tuple with the Virtual field value if set, nil otherwise
|
||||
// and a boolean to check if the value has been set.
|
||||
func (o *DBRP) GetVirtualOk() (*bool, bool) {
|
||||
if o == nil || o.Virtual == nil {
|
||||
return nil, false
|
||||
}
|
||||
return o.Virtual, true
|
||||
}
|
||||
|
||||
// HasVirtual returns a boolean if a field has been set.
|
||||
func (o *DBRP) HasVirtual() bool {
|
||||
if o != nil && o.Virtual != nil {
|
||||
return true
|
||||
}
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
// SetVirtual gets a reference to the given bool and assigns it to the Virtual field.
|
||||
func (o *DBRP) SetVirtual(v bool) {
|
||||
o.Virtual = &v
|
||||
}
|
||||
|
||||
// GetLinks returns the Links field value if set, zero value otherwise.
|
||||
func (o *DBRP) GetLinks() Links {
|
||||
if o == nil || o.Links == nil {
|
||||
@ -250,6 +284,9 @@ func (o DBRP) MarshalJSON() ([]byte, error) {
|
||||
if true {
|
||||
toSerialize["default"] = o.Default
|
||||
}
|
||||
if o.Virtual != nil {
|
||||
toSerialize["virtual"] = o.Virtual
|
||||
}
|
||||
if o.Links != nil {
|
||||
toSerialize["links"] = o.Links
|
||||
}
|
||||
|
Reference in New Issue
Block a user