influx-cli/api/model_line_protocol_length_error.gen.go

167 lines
4.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"
)
// LineProtocolLengthError struct for LineProtocolLengthError
type LineProtocolLengthError struct {
Code LineProtocolLengthErrorCode `json:"code" yaml:"code"`
// Message is a human-readable message.
Message string `json:"message" yaml:"message"`
// Max length in bytes for a body of line-protocol.
MaxLength int32 `json:"maxLength" yaml:"maxLength"`
}
// NewLineProtocolLengthError instantiates a new LineProtocolLengthError 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 NewLineProtocolLengthError(code LineProtocolLengthErrorCode, message string, maxLength int32) *LineProtocolLengthError {
this := LineProtocolLengthError{}
this.Code = code
this.Message = message
this.MaxLength = maxLength
return &this
}
// NewLineProtocolLengthErrorWithDefaults instantiates a new LineProtocolLengthError 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 NewLineProtocolLengthErrorWithDefaults() *LineProtocolLengthError {
this := LineProtocolLengthError{}
return &this
}
// GetCode returns the Code field value
func (o *LineProtocolLengthError) GetCode() LineProtocolLengthErrorCode {
if o == nil {
var ret LineProtocolLengthErrorCode
return ret
}
return o.Code
}
// GetCodeOk returns a tuple with the Code field value
// and a boolean to check if the value has been set.
func (o *LineProtocolLengthError) GetCodeOk() (*LineProtocolLengthErrorCode, bool) {
if o == nil {
return nil, false
}
return &o.Code, true
}
// SetCode sets field value
func (o *LineProtocolLengthError) SetCode(v LineProtocolLengthErrorCode) {
o.Code = v
}
// GetMessage returns the Message field value
func (o *LineProtocolLengthError) GetMessage() string {
if o == nil {
var ret string
return ret
}
return o.Message
}
// GetMessageOk returns a tuple with the Message field value
// and a boolean to check if the value has been set.
func (o *LineProtocolLengthError) GetMessageOk() (*string, bool) {
if o == nil {
return nil, false
}
return &o.Message, true
}
// SetMessage sets field value
func (o *LineProtocolLengthError) SetMessage(v string) {
o.Message = v
}
// GetMaxLength returns the MaxLength field value
func (o *LineProtocolLengthError) GetMaxLength() int32 {
if o == nil {
var ret int32
return ret
}
return o.MaxLength
}
// GetMaxLengthOk returns a tuple with the MaxLength field value
// and a boolean to check if the value has been set.
func (o *LineProtocolLengthError) GetMaxLengthOk() (*int32, bool) {
if o == nil {
return nil, false
}
return &o.MaxLength, true
}
// SetMaxLength sets field value
func (o *LineProtocolLengthError) SetMaxLength(v int32) {
o.MaxLength = v
}
func (o LineProtocolLengthError) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if true {
toSerialize["code"] = o.Code
}
if true {
toSerialize["message"] = o.Message
}
if true {
toSerialize["maxLength"] = o.MaxLength
}
return json.Marshal(toSerialize)
}
type NullableLineProtocolLengthError struct {
value *LineProtocolLengthError
isSet bool
}
func (v NullableLineProtocolLengthError) Get() *LineProtocolLengthError {
return v.value
}
func (v *NullableLineProtocolLengthError) Set(val *LineProtocolLengthError) {
v.value = val
v.isSet = true
}
func (v NullableLineProtocolLengthError) IsSet() bool {
return v.isSet
}
func (v *NullableLineProtocolLengthError) Unset() {
v.value = nil
v.isSet = false
}
func NewNullableLineProtocolLengthError(val *LineProtocolLengthError) *NullableLineProtocolLengthError {
return &NullableLineProtocolLengthError{value: val, isSet: true}
}
func (v NullableLineProtocolLengthError) MarshalJSON() ([]byte, error) {
return json.Marshal(v.value)
}
func (v *NullableLineProtocolLengthError) UnmarshalJSON(src []byte) error {
v.isSet = true
return json.Unmarshal(src, &v.value)
}