influx-cli/api/model_label.gen.go

223 lines
5.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"
)
// Label struct for Label
type Label struct {
Id *string `json:"id,omitempty" yaml:"id,omitempty"`
OrgID *string `json:"orgID,omitempty" yaml:"orgID,omitempty"`
Name *string `json:"name,omitempty" yaml:"name,omitempty"`
// Key-value pairs associated with this label. To remove a property, send an update with an empty value (`\"\"`) for the key.
Properties *map[string]string `json:"properties,omitempty" yaml:"properties,omitempty"`
}
// NewLabel instantiates a new Label 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 NewLabel() *Label {
this := Label{}
return &this
}
// NewLabelWithDefaults instantiates a new Label 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 NewLabelWithDefaults() *Label {
this := Label{}
return &this
}
// GetId returns the Id field value if set, zero value otherwise.
func (o *Label) 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 *Label) 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 *Label) 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 *Label) SetId(v string) {
o.Id = &v
}
// GetOrgID returns the OrgID field value if set, zero value otherwise.
func (o *Label) GetOrgID() string {
if o == nil || o.OrgID == nil {
var ret string
return ret
}
return *o.OrgID
}
// GetOrgIDOk returns a tuple with the OrgID field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Label) GetOrgIDOk() (*string, bool) {
if o == nil || o.OrgID == nil {
return nil, false
}
return o.OrgID, true
}
// HasOrgID returns a boolean if a field has been set.
func (o *Label) HasOrgID() bool {
if o != nil && o.OrgID != nil {
return true
}
return false
}
// SetOrgID gets a reference to the given string and assigns it to the OrgID field.
func (o *Label) SetOrgID(v string) {
o.OrgID = &v
}
// GetName returns the Name field value if set, zero value otherwise.
func (o *Label) GetName() string {
if o == nil || o.Name == nil {
var ret string
return ret
}
return *o.Name
}
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Label) GetNameOk() (*string, bool) {
if o == nil || o.Name == nil {
return nil, false
}
return o.Name, true
}
// HasName returns a boolean if a field has been set.
func (o *Label) HasName() bool {
if o != nil && o.Name != nil {
return true
}
return false
}
// SetName gets a reference to the given string and assigns it to the Name field.
func (o *Label) SetName(v string) {
o.Name = &v
}
// GetProperties returns the Properties field value if set, zero value otherwise.
func (o *Label) GetProperties() map[string]string {
if o == nil || o.Properties == nil {
var ret map[string]string
return ret
}
return *o.Properties
}
// GetPropertiesOk returns a tuple with the Properties field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *Label) GetPropertiesOk() (*map[string]string, bool) {
if o == nil || o.Properties == nil {
return nil, false
}
return o.Properties, true
}
// HasProperties returns a boolean if a field has been set.
func (o *Label) HasProperties() bool {
if o != nil && o.Properties != nil {
return true
}
return false
}
// SetProperties gets a reference to the given map[string]string and assigns it to the Properties field.
func (o *Label) SetProperties(v map[string]string) {
o.Properties = &v
}
func (o Label) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.OrgID != nil {
toSerialize["orgID"] = o.OrgID
}
if o.Name != nil {
toSerialize["name"] = o.Name
}
if o.Properties != nil {
toSerialize["properties"] = o.Properties
}
return json.Marshal(toSerialize)
}
type NullableLabel struct {
value *Label
isSet bool
}
func (v NullableLabel) Get() *Label {
return v.value
}
func (v *NullableLabel) Set(val *Label) {
v.value = val
v.isSet = true
}
func (v NullableLabel) IsSet() bool {
return v.isSet
}
func (v *NullableLabel) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLabel(val *Label) *NullableLabel {
return &NullableLabel{value: val, isSet: true}
}
func (v NullableLabel) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLabel) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}