influx-cli/api/model_cell.gen.go

331 lines
7.2 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"
)
// Cell struct for Cell
type Cell struct {
Id *string `json:"id,omitempty" yaml:"id,omitempty"`
Links *CellLinks `json:"links,omitempty" yaml:"links,omitempty"`
X *int32 `json:"x,omitempty" yaml:"x,omitempty"`
Y *int32 `json:"y,omitempty" yaml:"y,omitempty"`
W *int32 `json:"w,omitempty" yaml:"w,omitempty"`
H *int32 `json:"h,omitempty" yaml:"h,omitempty"`
// The reference to a view from the views API.
ViewID *string `json:"viewID,omitempty" yaml:"viewID,omitempty"`
}
// NewCell instantiates a new Cell 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 NewCell() *Cell {
this := Cell{}
return &this
}
// NewCellWithDefaults instantiates a new Cell 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 NewCellWithDefaults() *Cell {
this := Cell{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Cell) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}
// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Cell) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}
// HasId returns a boolean if a field has been set.
func (o *Cell) HasId() bool {
if o != nil && o.Id != nil {
return true
}
return false
}
// SetId gets a reference to the given string and assigns it to the Id field.
func (o *Cell) SetId(v string) {
o.Id = &v
}
// GetLinks returns the Links field value if set, zero value otherwise.
func (o *Cell) GetLinks() CellLinks {
if o == nil || o.Links == nil {
var ret CellLinks
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 *Cell) GetLinksOk() (*CellLinks, 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 *Cell) HasLinks() bool {
if o != nil && o.Links != nil {
return true
}
return false
}
// SetLinks gets a reference to the given CellLinks and assigns it to the Links field.
func (o *Cell) SetLinks(v CellLinks) {
o.Links = &v
}
// GetX returns the X field value if set, zero value otherwise.
func (o *Cell) GetX() int32 {
if o == nil || o.X == nil {
var ret int32
return ret
}
return *o.X
}
// GetXOk returns a tuple with the X field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Cell) GetXOk() (*int32, bool) {
if o == nil || o.X == nil {
return nil, false
}
return o.X, true
}
// HasX returns a boolean if a field has been set.
func (o *Cell) HasX() bool {
if o != nil && o.X != nil {
return true
}
return false
}
// SetX gets a reference to the given int32 and assigns it to the X field.
func (o *Cell) SetX(v int32) {
o.X = &v
}
// GetY returns the Y field value if set, zero value otherwise.
func (o *Cell) GetY() int32 {
if o == nil || o.Y == nil {
var ret int32
return ret
}
return *o.Y
}
// GetYOk returns a tuple with the Y field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Cell) GetYOk() (*int32, bool) {
if o == nil || o.Y == nil {
return nil, false
}
return o.Y, true
}
// HasY returns a boolean if a field has been set.
func (o *Cell) HasY() bool {
if o != nil && o.Y != nil {
return true
}
return false
}
// SetY gets a reference to the given int32 and assigns it to the Y field.
func (o *Cell) SetY(v int32) {
o.Y = &v
}
// GetW returns the W field value if set, zero value otherwise.
func (o *Cell) GetW() int32 {
if o == nil || o.W == nil {
var ret int32
return ret
}
return *o.W
}
// GetWOk returns a tuple with the W field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Cell) GetWOk() (*int32, bool) {
if o == nil || o.W == nil {
return nil, false
}
return o.W, true
}
// HasW returns a boolean if a field has been set.
func (o *Cell) HasW() bool {
if o != nil && o.W != nil {
return true
}
return false
}
// SetW gets a reference to the given int32 and assigns it to the W field.
func (o *Cell) SetW(v int32) {
o.W = &v
}
// GetH returns the H field value if set, zero value otherwise.
func (o *Cell) GetH() int32 {
if o == nil || o.H == nil {
var ret int32
return ret
}
return *o.H
}
// GetHOk returns a tuple with the H field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Cell) GetHOk() (*int32, bool) {
if o == nil || o.H == nil {
return nil, false
}
return o.H, true
}
// HasH returns a boolean if a field has been set.
func (o *Cell) HasH() bool {
if o != nil && o.H != nil {
return true
}
return false
}
// SetH gets a reference to the given int32 and assigns it to the H field.
func (o *Cell) SetH(v int32) {
o.H = &v
}
// GetViewID returns the ViewID field value if set, zero value otherwise.
func (o *Cell) GetViewID() string {
if o == nil || o.ViewID == nil {
var ret string
return ret
}
return *o.ViewID
}
// GetViewIDOk returns a tuple with the ViewID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Cell) GetViewIDOk() (*string, bool) {
if o == nil || o.ViewID == nil {
return nil, false
}
return o.ViewID, true
}
// HasViewID returns a boolean if a field has been set.
func (o *Cell) HasViewID() bool {
if o != nil && o.ViewID != nil {
return true
}
return false
}
// SetViewID gets a reference to the given string and assigns it to the ViewID field.
func (o *Cell) SetViewID(v string) {
o.ViewID = &v
}
func (o Cell) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Links != nil {
toSerialize["links"] = o.Links
}
if o.X != nil {
toSerialize["x"] = o.X
}
if o.Y != nil {
toSerialize["y"] = o.Y
}
if o.W != nil {
toSerialize["w"] = o.W
}
if o.H != nil {
toSerialize["h"] = o.H
}
if o.ViewID != nil {
toSerialize["viewID"] = o.ViewID
}
return json.Marshal(toSerialize)
}
type NullableCell struct {
value *Cell
isSet bool
}
func (v NullableCell) Get() *Cell {
return v.value
}
func (v *NullableCell) Set(val *Cell) {
v.value = val
v.isSet = true
}
func (v NullableCell) IsSet() bool {
return v.isSet
}
func (v *NullableCell) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableCell(val *Cell) *NullableCell {
return &NullableCell{value: val, isSet: true}
}
func (v NullableCell) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableCell) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}